Profiler so slow I can't even complain that it's slow

All of this is for Unity 2020.2.0f1

So I was trying to dig into why making a fairly large UI Toolkit UI took 4 seconds, which made it kinda useless.

I ran it through the editor deep profiler. Trying to figure out what was going on was made painful due to the profiler often taking 20+ seconds to select… anything. A frame, a row in the hierarchy, etc.

So I figured that I should try to send a bug report for that - or at least check if it was due to me running low on memory (I only have 16 gigs, after all!), so I decided to save the profiler data to a file so I could open it in a different project that doesn’t require as much ram to be open. Then I could check if the slowness was consistent.


That might be a problem. Two questions:

  • why can’t I save profiler frames that are over 2GB?
  • what on earth is happening to cause the frame size to be larger than 2GB? That seems excessive!

Hi Baste,
Yes the 2GB limit is a limitation of the processed .data format. One of the reasons we are considering to drop that going forward. The .raw format generated via Profiling.Profiler.logFile does not have that limitation, so you could use that to create a sharable profiler file.

Also, we’ve been working on improving the performance of drawing the charts for 2020. We have performance tests, monitoring the performance of showing the CPU Timeline and Hierarchy views, and going forward from 2021.1, also the performance of selecting sample items in these views. They didn’t show any regressions, which isn’t to say that they might not have missed something, or that the performance couldn’t be improved. Just that we are holding ourselves to only improving the performance of the Profiler UI with these and not regress them with new features or other changes.

Details on where we should maybe focus our attention is very welcome (also in the form of such a bug report):slight_smile: