Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Skyrocket your performance with background tasks
Search
Myracle
June 27, 2020
Programming
0
77
Skyrocket your performance with background tasks
My talk at Flutter Day India 2020 - Isolates - Background Tasks with Workmanager
Myracle
June 27, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
240
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
270
安いハードウェアでVulkan
fadis
1
840
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
270
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
570
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
200
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
100
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
160
KagglerがMixSeekを触ってみた
morim
0
340
The free-lunch guide to idea circularity
hollycummins
0
390
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
270
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
The Invisible Side of Design
smashingmag
302
51k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
420
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
94
WENDY [Excerpt]
tessaabrams
9
37k
Code Reviewing Like a Champion
maltzj
528
40k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
53k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Transcript
Skyrocket your performance with Background Tasks MAX WEBER – FLUTTER
DAY INDIA 2020
About Me u Founder of FlutterExplained u Software Engineer u
Consultant u Trainer u Public Speaker @flutter_exp FlutterExplained
Intro into Background Tasks u Long Running Tasks besides of
Flutter u Your app is currently not active but performs tasks u Two different “background” states u Background State u “Destroyed” State
Isolates u Isolate is a contained instance of Dart u
It has its own uEvent Loop uMemory
Overview
We start easy…
Create an Isolate
None
Helper: compute Function u Compute is a helper function u
Creates an Isolate and runs in background u Less boilerplate u Returns a value u Limited Functionality
Isolates work fine… For apps that are in background Performs
heavy calculation tasks Allow Multi thread in Dart Speed up your applications! but… Stops when FlutterActivity is destroyed
App suspended, what now? u Plugins to the rescue u
Native Device Code starts up Flutter Engine u Runs our Dart Code u Downsides u Super code heavy u Native Code u No / Few Documentation
Documentation
Background Behavior Android u AlarmManager u JobService u Firebase Job
Dispatcher u WorkManager iOS u Minimum background fetch interval u iOS could decide never execute our code
Workmanager Package u Facilitates the u Android WorkManager u iOS
performFetchWithCompletionHandler u Reduces installation effort to a minimum u No Native Code in Kotlin or Swift
Setup WorkManager
None
CallbackDispatcher (Isolate)
Conclusion u Isolates u improve your apps performance u Careful
with “overengineering” u Background Tasks u iOS and Android have different approaches u Both are not perfectly flexible u Recommendation to use a package
Ressources u https://medium.com/vrt-digital-studio/flutter-workmanager-81e0cfbd6f6e u https://medium.com/flutter/executing-dart-in-the-background-with- flutter-plugins-and-geofencing-2b3e40a1a124 u https://flutter.dev/docs/development/packages-and-plugins/developing- packages u
https://medium.com/stuart-engineering/keep-flutter-running-background- on-android-6ffc85be0234 u https://pub.dev/packages/workmanager
” “ Thank you