Profile Analyzer pull data performance

Hello,
I’ve been trying to use the profile analyzer to help detect some common issues we’ve experienced at runtime. When it comes to scripting issues, we prefer deep profiling as it gives us much more precise information about where an issue might be.
The problem we’re having is when attempting to use Deep Profiling data with the profile analayzer. Pulling 300 frames worth of data into the profile analyzer takes well over 20 mins on some pretty beefy machines. And even when the data is loaded, attempting to select multiple frames leads to yet more waiting.
I understand that deep profile data is quite big so I am asking if anything can be done on our side to improve load times?

Yeah, it scales badly with the number of markers you have to process, and it’s done on the MainThread only, so to speed up processing do short recordings, or use selective deep profiling.

Overall, with deep profiling, the timings you capture will be quite off as the cost of having each function call instrumented with the number of calls becomes high so you could make wrong assumptions on the performance of your code. Instead, I’d recommend employing profiler markers to instrument the code of interest (specific method, a chain of methods, etc) and using a regular unity profiler with extra markers you’ve added by hand. Another thing you may consider is trying Selective Deep profiling. Alternatively, other types of profilers (sampling profilers) allow capturing the full callstack at specific frequencies (Android Studio, Intel VTune, Superluminal, Xcode Instruments, etc).

Hi there - completely agree with Alexander above, Deep Profiling can distort what seems expensive in a capture, because every time a C# function is called or returns we do work to add profiling information. This means that code which makes a lot of function calls looks more expensive than code which does not.

However, if you really find it useful and want to use Profile Analyzer with the data, make sure to turn Deep Profile off in the profiler window before you pull the data. Otherwise we’ll be doing that enter/exit function work for all of the Profile Analyzer setup as well, which will significantly slow it down (a local test shows it’s about 3 or 4 times faster when Deep Profile is turned off in the Profiler). This will also be slowing down other Editor code you have running, so make sure to turn Deep Profile off when you’re not using it!