flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.58k stars 326 forks source link

Jank alert is confusing. #4916

Open polina-c opened 1 year ago

polina-c commented 1 year ago
Screenshot 2022-12-09 at 10 22 46 AM

The alert is saying 2 frames junked with a total of 98.4 ms spent in shader compilation..

What is unclear:

  1. What is expected compilation time?
  2. What 'total' means? is is sum for two frames? Or it is average total per frame?

I would suggest to output average total per frame, because otherwise user have to calculate it in head.

Suggestion: 2 frames junked with average 98.4 ms spent in shader compilation vs allowed 12 ms.

polina-c commented 1 year ago

Also it would be usable to see list of alerts as a table, that can be sorted, so that user does not have to scroll right and left. May be collapsible table in frame analysis, so that user can select either row in the table or frame in the chart?

kenzieschmoll commented 1 year ago

Also it would be usable to see list of alerts as a table, that can be sorted, so that user does not have to scroll right and left.

What do you mean by this? In your screenshot, there is only one alert (The shader compilation error alert), that can be closed with the X in the upper right

The Flutter frames chart is the "master" view for the master-detail relationship between the flutter frames and the performance tabs (Frame Analysis and Timeline Events, and eventually, raster metrics too)

kenzieschmoll commented 1 year ago

What is expected compilation time?

The fact that there is shader compilation time in the frame is not the issue - the issue is that the frame's raster time was over budget to achieve the target FPS (in this case 120), and shader compilation contributed to the raster jank in the frame. In some cases, shader compilation time may not be the majority of the raster time, but sometimes it is, like in this case. This is why we tell the user how much time their app spent in shader compilation.