+10 votes

At certain points I spawn a lot of enemies onto the screen. I captured the performance hit on the profiler and it looks like this:

enter image description here

I can see that my script time has gone up dramatically, but it looks like Idle time is the biggest contributor. What is Idle time, and why is it slowing things down so much? Why is Physics Frame Time always 100%? What are some good optimization techniques for Godot/general tips & tricks when reading the Profiler?

Thanks!

Guess: Idle time is processor waiting for things to happen. Likely, the processor is waiting on memory to load, allocate, or deallocate. Pooling and maybe Sprite sheets (instead of separate PNGs) would help lower this.

asked Apr 11, 2018 in Engine by jarlowrey (611 points)
edited Apr 11, 2018 by jarlowrey

Any update on this ?
really cant seem to use profiler info to hunt down my performance issue :-(

i'll tell what i know;
physics frame is always 100% because you measure Physics Frame %, it took 1/60 second, or 0.016 second per frame (using 60 fps, in 1second there are 60 frame ). it always constant as it was supposed to be

1 Answer

0 votes

When the idle-time is too high, then your _process() is waiting for something to finish.. maybe vsync or any other timer-consuming function.
This video will definitely helps you.

https://youtu.be/-b1dylw9v2o

enter image description here

answered Jun 5 by ProggerParrot (116 points)
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.