0 votes

I am profiling my game and for the first 15 minutes i am getting 60 fps. After that the fps drops to 45 -50 and after 5 minutes the fps drops to 30 and so on .

By using profiler everything seems OK except for idle time , its the reason for low frame rate, Its high.

My Memory usage and object count are constant .

What exactly is idle time and why is it increasing over time ?

in Engine by (731 points)

Is your game/computer completely idle for those 15 minutes?

no bots were fighting each other

Do FPS come back up if you interact with the window? Check your graphics card power management state, sometimes it might decrease due to "inactivity" which causes slowdowns like this. Check also memory and GPU memory (not just from Godot's debugger).

Another possibility is a bug in your game accumulating something, but not sure what it could be (it doesnt have to be objects, could be an array getting bigger and bigger, a draw call iterating more and more, or a GDNative library doing something wrong).

Otherwise, Godot bug, but it's even harder to tell what. Maybe you can try making a simple project to see if anyone else can reproduce it.

FYI, in Godot 3.2.1 (still using 3.0?), idle time correspond to this section of the main loop: https://github.com/godotengine/godot/blob/02ed72c3733aa2290dec9ffca52a7bbbc96382c3/main/main.cpp#L2026-L2049

Thanks i will check.

Another possibility is a bug in your game accumulating something, 

Yes you are right, i fixed it. It was gdnative plugin , it was accumulating movement states without clearing used ones.

1 Answer

–1 vote

HI, i think i might have the same issue, my idle time is very high.

How did you figure out what was causing it?


by (24 points)

Use the Comment button to reply, not answers.

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.