Custom Entrypoints for Smarter Background Processing
summary
A concrete account of making a custom isolate as default to avoid a large refactor when moving a backend from REST to socket IO, including native changes: overriding app delegate/main activity, creating a cached FlutterEngine on Android, and registering plugins for headless isolates. Shows isolate APIs used (isolate.run/compute, spawn vs spawnUri), port-based messaging, and a benchmark: heavy task 3s + main 6.6s reduced total from 9.6s to 6.6s with parallel isolates. Covers protobuf serialization to replace JSON, lifecycle cleanup, and uncaught-error pitfalls.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:05Background processing necessity
- 3:12Dart isolates overview
- 7:28Isolate life cycle
- 9:13Flutter isolates launch
- 12:01Creating isolates
- 17:04Default isolate creation
- 23:14Advanced isolate uses
- 24:19Isolate pitfalls
- 26:05Data serialization
- 31:01Isolate communication
- 32:26Q&A
related talks
34mNative Background Processing with Flutter
32mHeavy lift work in Flutter get started with Isolates
15mWhen, why, and how to multithread in Flutter
30mExtra! Extra! Thread all about it!
42mKotlin Multiplatform multithreading old and new way
44mIdioms for Building Fault-tolerant Applications with Elixir
37mCrashing BEAM applications
01h 14mMultithreading in UI application: When some threads are more equal than others
