devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Switching from class to class sometimes is slow

Open kenzieschmoll opened this issue 3 years ago • 4 comments

On the memory diff tab, after taking a snapshot, pretend we have classes A and B.

Selecting class A performs computation to calculate the set of retaining paths for to A. Then selecting class B, does the same thing for all the retaining paths of class B. Selecting class A again should be fast, since we have already performed this work. But it appears to take equally as long to compute the set of retaining paths. I suspect we are not caching this computation.

kenzieschmoll avatar Nov 30 '22 19:11 kenzieschmoll

The retaining paths are calculated once for each class and stored. And i do not see any performance issues. Can you provide steps to repro and/or video to illustrate the issue?

polina-c avatar Nov 30 '22 20:11 polina-c

I wish my mouse was visible in this .gif, but the click is occurring right when the row highlight color changes (indicating my mouse hovering over the row). I would use the DevTools CPU profiler to profile the operation that occurs after selecting a row. That should give some insight into what is taking up the majority of the CPU during this time.

slow-retaining-paths

kenzieschmoll avatar Nov 30 '22 21:11 kenzieschmoll

Thanks. What is application?

polina-c avatar Nov 30 '22 21:11 polina-c

I was running flutter gallery on iOS simulator. It has been running for several days.

kenzieschmoll avatar Nov 30 '22 23:11 kenzieschmoll