-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
TTID & TTFD for navigating between screens #1780
Comments
This TTID and TTID metric collection is a bit tricky with Flutter since it doesn't have similar concept to Androids Therefore, the only time those metrics are actually helpful is during the app startup, not during screen changes. The first frame is drawn when the first However, you can manually defer drawing of the first frame via https://api.flutter.dev/flutter/rendering/RendererBinding/deferFirstFrame.html together with https://api.flutter.dev/flutter/rendering/RendererBinding/allowFirstFrame.html Hooking into those methods is possible via custom widgetsbinding (I did play around with that for measuring methodchannel, so I can give you some pointers if interested). Ultimately, I kinda question whether the metrics are actually useful for Flutter since they're probably virtually identical to the app start metrics, or at least very similar. |
If it's done right, it still makes sense IMO, eg when a new route is called, it's technically a new widget/screen. The question is if it's possible to determine the very first frame drawn on that route for properly measuring TTID (without a delay, will need a callback that is executed right away after the frame is drawn). The other thing to figure out is that the routing methods are non-async methods and you can't |
Would using afaik Doesn't solve the potential event loop delays but it might be a direction we can look into for the callback. |
@denrase and I played a bit with that, we also used it for app start, but it's a global callback, and not per screen, so you might get the wrong callback and assume it's the one you want (just a hunch).
|
Description
Implement:
TTID (Time to Initial Display) - for a screen, the time it takes to load the minimally interactive state (background, navigation, fast loading local content)
TTFD (Time to Full Display) - for a screen, the time it takes to completely render the screen, including content from disk/network
TTID:
TTFD:
Sentry.reportFullyDisplayed()
The text was updated successfully, but these errors were encountered: