-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Description
The timeline events for LAYOUT differ from the time spent in PipelineOwner.flushLayout. In the case of the default flutter project, for the first frame, the timeline event says LAYOUT takes 78.9ms, but when running the same app through Instruments, PipelineOwner.flushLayout is reported to be 13ms. The LAYOUT event is generated inside of PipelineOwner.flushLayout so they should be equivalent. I suspect this may be a difference between cpu time and clock time? When the difference is so dramatic it seems like that distinction should be visible in DevTools somehow. It also seems to be a problem that the cpu time and the clock time are so dramatically different, that indicates the UI thread is being preempted a lot at startup.
Steps to reproduce
flutter create countercd counterflutter run --profile- connect to DevTools and look at the LAYOUT event
open ios/Runner.xcworkspace- 'Product -> Profile`
- Use the CPU profiler in Instruments
- Run the app
- Search in Instruments for the flushLayout symbol.
cc @kenzieschmoll for DevTools visibility cc @dnfield for performance consideration

