What is included in "Process Time" in the built-in profiler besides script _process time?

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

Hi all,

I’m running into frame rate issues with a game built on Godot where my game seems to be running at ~10 FPS since updating to 4.0 from 3.3. I tried running the profiler to figure out where the issue is, and it looks like the lag is coming from “Process Time”:

high process time at 108ms

I interpreted this to mean time spent running “_process()” functions in my scripts, but the profiler is showing that those functions take a fraction of a millisecond in total:

script functions time shows as 0.03ms

So my question is: what else is included in “Process Time” that could possibly be causing the slowdown? If it makes any difference, this game is pretty much built out of Control nodes at the moment.

Thanks in advance!

:bust_in_silhouette: Reply From: shinyu6

Answering my own question: I was able to tab into the Visual Profiler and figure this out but I had to wait a few seconds before data started appearing, which showed that bottlenecking was occurring on the GPU not the CPU. I was also able to get more information from going Project Settings → Advanced Settings → Print GPU profile, which made it obvious that most of the issue was in the “Render CanvasItems” step.

Maybe less relevant to other folks looking at this, but my issue looked like Poor performance of 2D Tree View with many items · Issue #70869 · godotengine/godot · GitHub, which was resolved when using the openGL compatibility backend.