Running the profiler - confusing Frame Time drops every 30 frames

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kickmaniac

My profiler shows drops in the Frame Time from ~31ms to <1ms precisely every 30 frames and the whole scene stutters during this frame. Idle Time which is normally ~30ms also drops to below 1ms.

Imgur

What confuses me is that I’d expect some script to load the system during that frame which would cause stuttering, but as you can see on the screenshot - nothing of note happens during that frame, if anything, less stuff is happening than in a normal frame.

I will start backtracking my recent commits since it seems to have appeared recently, but does anyone have any idea what might cause this behaviour in theory?

:bust_in_silhouette: Reply From: kickmaniac

Googling more gave me the answer on how to workaround this problem, that is to switch off Remote Scene Tree during debugging.

What remains unclear is what exactly caused the start of this stuttering. Was it simply growing complexity of the code? Was it still some poorly optimised _process()? Mysterious.