You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Surface cost of intrinsics calculations in traces #93031
IntrinsicHeight and IntrinsicWidth can be pretty expensive. In traces, this cost is currently only seen when debugProfileLayoutsEnabled is turned on. We should surfaces it in the traces even if that option is turned off.
/cc @dnfield
/cc @kenzieschmoll The cost of intrinsics may be another thing to highlight in janky frames.
The easiest way to do this would be to just add tracing in the RenderObjects of IntrinsicHeight and IntrinsicWidth around the entry point into the intrinsics methods to track the part before laying out the actual child.
A smarter way may be to start the trace the first time an intrinsics method is called and keep track of how deep we are inside the intrinsics callstack. When the last intrinsics method returns, we end the trace.
another option would be to add Timeline traces around the get*Intrinsic* methods, that would hit other use cases too, beyond the widgets. It would mean the overhead is higher though...
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Hixie commentedon Nov 3, 2021
Did you have in mind putting a Timeline event that covers the pre-child-layout part of the intrinsics layout?
goderbauer commentedon Nov 3, 2021
The easiest way to do this would be to just add tracing in the RenderObjects of IntrinsicHeight and IntrinsicWidth around the entry point into the intrinsics methods to track the part before laying out the actual child.
A smarter way may be to start the trace the first time an intrinsics method is called and keep track of how deep we are inside the intrinsics callstack. When the last intrinsics method returns, we end the trace.
Hixie commentedon Nov 4, 2021
another option would be to add Timeline traces around the
get*Intrinsic*methods, that would hit other use cases too, beyond the widgets. It would mean the overhead is higher though...13 remaining items
github-actions commentedon Dec 24, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.