+1 vote

Hey all,

I've been working on an initial optimization pass for my game now that I'm visiting family and stuck using my old shitty laptop for development. I've made some decent progress but I've hit a bit of a wall and I want to understand whether there's any headroom left for this or if I'm fundamentally limited by my subpar hardware at this point.

I've been using Godot's built-in profiler to try and pinpoint problematic code paths and I've had some great initial success with this. Basically, I start the profiler on game startup and continue until I start experiencing fairly consistent stutter (my current problem), then I go back and see if there are specific script functions that are causing issues.

However, I'm wondering now whether there's any more room for improvement in some cases given some strange behavior I've noticed: mainly, that script functions are no longer really showing up as problematic on the profiler (except for the occasional single-frame spike), despite the fact that the game is stuttering and that the idle (and to a lesser extent, physics) frame times are still pretty bad (e.g. 40+ ms).

My hypothesis is that the profiler is actually measuring "wall clock time", and not the actual in-process time that the game is taking. That is, supposing my shitty laptop CPU is also running a million other background processes, the profiler is reporting huge idle times because the actual game process is being constantly scheduled out to make time for other CPU-intensive processes, and thus doesn't get a chance to run enough to produce a solid 60 fps.

Does anyone know if this is the case? That is, does Godot's profiler measure just the time that the game process takes to run when scheduled, or does it measure that wall clock time which would presumably include all other processes running on my laptop? If it's measuring just the game process' time, then I may still have room for improvement. But if it's measuring wall clock time, then it's hard for me to know whether I've hit a wall and just have to deal with the fact that my CPU is too underpowered.

Thanks in advance!

in Engine by (45 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.