Profiling tool - spikes in graph

Using commands “stat StartFile” and “stat StopFile” in a development build, I produce data files that can be then loaded into the UE4 front-end on the profiling tab.

The front-end program and its documentation seems to indicate that I can select a single frame, where the frame-time spikes, and use this to determine what is causing the spike. But in practice this feature seems to be useless - maybe somebody can correct me. Here is my graph and I’ve selected a spiked frame:

Now, I find that pretty much every single spike is caused by “CPU Stall - Wait For Event”, which indicates to me that it’s waiting on another thread. The RenderThread is also being spiked by this. The GPU has hardly any work to do, so I’m pretty sure they aren’t waiting on that. In the end, the only thread that doesn’t seem to be waiting for anything (and thus I assume is the culprit) is the StatsThread, which appears to be writing the very data file out.

Now, this makes sense to me - writing to HDD is a costly thing. But I can’t help but think that it renders the idea of selecting and focusing on spikes useless, certainly in this case. What am I missing here? Is there any way to take the HDD-writing out of the equation?

Since it may be helpful, every spike is associated with a huge hang in “Condense” as in the picture below.

Hi! Did you found what was causing this “Condense” process? Im experiencing exactly the same issue :frowning:

I think, the stats thread is for executing console commands(stat startfile, stat fps, …etc). I tested in a android device with and without “stat fps”. When I dont use any stat command, performance is slightly faster than stat commands.