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
74
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
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
340
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
710
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
150
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
990
CSC509 Lecture 07
javiergs
PRO
0
250
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
890
Ktorで簡単AIアプリケーション
tsukakei
0
120
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
610
Register is more than clipboard
satorunooshie
1
150
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
420
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
It's Worth the Effort
3n
187
28k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Building Applications with DynamoDB
mza
96
6.7k
What's in a price? How to price your products and services
michaelherold
246
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Fireside Chat
paigeccino
41
3.7k
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