3 ms·
I was surprised to see how janky the gallery demo app is on mobile, especially considering Dart is AOT compiled. Apparently Flutter is single threaded too and h
by udbhavs 5y ago
I was surprised to see how janky the gallery demo app is on mobile, especially considering Dart is AOT compiled. Apparently Flutter is single threaded too and has a feature called "Isolates" but I'm not sure if they can be used to paint animations off the main thread
- dsissitka 5y agoHave you tried it recently? When I tried it a couple of weeks ago on an old Android device (Pixel 3A) there was a little jank. Then I tried a couple apps bundled with Android and was surprised to find a comparable amount of jank. I've heard it's worse on iOS though.
- Comevius 5y agoThe gallery demo app is janky on old Android devices with bad GPU drivers, and janky on iOS because of Metal, but those issues are being solved. The main issue with iOS and Metal is the shader compilation jank, for which the workaround is shader warm-up that can be automated, but requires an effort from the developer. Dart is single threaded, but the event loop is better than threads for most things, except heavy calculations, but that's what isolates are for. This is probably the best way to do it even in C when latency is important. CPU schedulers tend to leave you with less control over latency when there is underutilization or yielding.