Can you help me identify the cause of these poor performance spikes? [profiler]

I’m targeting mobile (Android) and I’m profiling our game to identify areas for optimisation.

I’m profiling using the editor and desktop as they provide better profiling support (no GPU profiling on Android) and can see more profiling info in the editor.

Anyway, I’m trying to identify these spikes I’m getting.

GPU time is 79.97ms, CPU 29.72ms

But under GPU profiling I can only see 2.5ms of processing

Same frame but CPU view:

Like wise, I only see less than 1ms of processing (CPU).

There is the Gfx.WaitForPresent, and I get that this is VSYNC/redraw wait, bu 24.69ms ? That’s way more than 16ms to wait for a frame to complete…

Render metrics:

Note - scene is static, nothing changing between the frame with the spike vs others.

Any ideas?

Is there anything interesting on the CPU track in the frames that have the spike in them ?

Also, does this happen in the editor? on devices? on a particular device? (if so, which one?)

The table in image 2 shows 24.69ms in Gfx.WaitForPresent and the next highest item is 0.1ms.

On closer inspection this is only happening in the editor - so likely not something to be concerned about.

Having the same thing happen on Windows builds. Even if the camera is still and nothing is updating. Some some possible problems with culling and dynamic GI, but hard to tell