3 ms·
Funny enough there has been a long standing issue (as in years) with metal shaders that make the first minute or so of animations in flutter stuttery as the sha
by novok 6y ago
Funny enough there has been a long standing issue (as in years) with metal shaders that make the first minute or so of animations in flutter stuttery as the shaders compile.
- exikyut 6y agoPresumably (asking out of curiosity, completely naive) there's no way to AOT compile them?
- novok 6y agoKind of? But there seems to be a bunch of barriers in making it happen: SkSL warm-up doesn’t help newer iPhones using Metal. Flutter recently migrated from OpenGL to Metal for all newer iOS devices. (Please reference Metal on iOS FAQ on which iOS devices are considered new enough to use Metal.) However, Skia currently only implemented the SkSL warm-up for OpenGL. So the SkSL warm-up would only speed up older iOS devices by default. If you find shader compilation jank to be an issue for your app on newer iPhones, please let us know by filing a GitHub issue. In the longer term, we have a plan to use test-based shader warm-up to mitigate this. If there’s an urgent need for fixing shader compilation jank on newer iPhones, please leave feedback on Issue 61045, and we can help you turn on OpenGL for your app. https://flutter.dev/docs/perf/rendering/shader https://flutter.dev/docs/perf/rendering/shader https://github.com/flutter/flutter/issues/61045 https://github.com/flutter/flutter/issues/61045
- sebe 6y agoTwo weeks ago on reddit "Shader precompilation for Metal has landed in Skia:" https://www.reddit.com/r/FlutterDev/comments/mq1ouu/advices_on_how_to_prevent_ios_first_launch_jank/guerm85?utm_source=share&utm_medium=web2x&context=3 https://www.reddit.com/r/FlutterDev/comments/mq1ouu/advices_... and comment from last week on a flutter issue say it's working for them on the master channel. https://github.com/flutter/flutter/issues/79298#issuecomment-823605168 https://github.com/flutter/flutter/issues/79298#issuecomment...
- novok 6y agoOther comments in other tickets said it might not be the complete solution, and it's not released on stable yet. I hope it works, but it might not. It's also a bit indicative that this kind of issue is left standing for years. The desktop resize jank one similarly took years to resolve.