-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect shader compilation jank #971
Comments
@ueman Maybe this is less relevant now since |
I mean it would still be nice to be able to detect it, but I don't mind closing this. I've opened this issue after Bruno asked me to. |
Lets see how |
Closed in favor of #1106 |
The idea is to detect shader compilation jank and then tell users, that they can improve it by following https://docs.flutter.dev/perf/shader.
Shader compilation only happens on a cold app start. Which means, comparing framedata from a cold start vs a warm start could give some indication? But that comparison is also just meaningful if the user of the app does the same thing after both app starts. Maybe some clever heuristic paired with the navigation observer does the trick?
There's https://api.flutter.dev/flutter/dart-ui/FrameTiming-class.html but only on newer Flutter versions (> 2.5 or 2.8 I believe. Also properties of that class are less on older versions). That can be used to do the calculation.
You can do some assumption regarding which framephases (https://api.flutter.dev/flutter/dart-ui/FramePhase.html) take too much time.
Since manual shader compilation is quite some work, there should be a way to opt-in/out, depending on the default.
The text was updated successfully, but these errors were encountered: