Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Andrea |
Hello, while using the engine for a 3D spaceship game, it happens sometime (i’m still not sure how to reproduce the issue, for now it seems random) that the game start stuttering (sometimes even freeze).
I notice that, when this happens, the GPU utilization is almost 0%, while it is normally around 10%.
While in this state, if I throttle up the spaceship (which cause more calculation both for new forces applied and orbital calculation) the GPU kicks in again (25% utilization) and the game fps goes up to 75 as usual.
This is very weird, i suppose somehow the engine fails at calling the GPU in, and the CPU has to compensate (failing).
Has this ever happened to you? Is there a way to directly control GPU/CPU usage?
Has this ever happened to you? Is there a way to directly control GPU/CPU usage?
No, you need to profile your code and see what’s taking the most time. Note that physics servers are not included in the profiler view (this is a known issue).
You can use microbenchmarking facilities like OS.get_ticks_usec()
in your code to perform manual profiling too.
Calinou | 2020-05-23 13:42
thanks for making me discover the profiler!! I wasnt aware this tool existed and was immediatly able to discover a couple of issues
Andrea | 2020-05-26 13:26
Too bad i stepped in the physics server not included i have huge peaks of idle times and no idea were do they come from
Andrea | 2020-05-28 13:05