godotengine / godotengine/godot
Editor FPS in View Frame Time seems wrong?
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
In 4.6 and 4.7 at least from what I have tested
### System information
Godot v4.7.stable (5b4e0cb0f) - Windows 11 (build 22631) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.16.1062) - 13th Gen Intel(R) Core(TM) i7-13700K (24 threads) - 31.74 GiB memory - WASAPI (48000 Hz, Stereo/mono)
### Issue description
From my testing, working on a very heavy scene for VR, I have noticed the reported FPS in View Frame Time is not what I actually see. It might be me miss-understanding the meaning behind the FPS stat but it seems to only count GPU time rather than combined GPU and CPU time (which would be more correct for a separate render thread if used but isn't in this case). Which leads to situations where it reads as 200+ fps but I can feel stuttering / lower fps.
Video is taken with my own fork of Godot 4.7.1rc but that shouldn't matter in this case.
https://github.com/user-attachments/assets/0244c6ee-1b97-4fb3-b66f-c529339c67a8
If you can't watch the video:
Editor View Frame Time shows, CPU time 5.19ms and GPU time 5.68ms and 175 FPS
Doing the math with only GPU time -> 1000/5.68 give us roughly 176 FPS which aligns with what the editor shows
Doing the math with CPU and GPU time -> 1000/10.87 gives us roughly 92 FPS which aligns with what RTSS shows (94 FPS) and what I can feel.
### Steps to reproduce
I suppose just having a scene open that also utilizes CPU more than just 0-1 ms and using something like RTSS you can see the discrepancy between Editor reported FPS and actual FPS.
### Minimal reproduction project (MRP)
Unfortunately I don't have an MRP but this should be seen in any project / scene given cpu usage is higher than 0-1ms.
Contributor guide
Research direction
Start at the editor's View Frame Time display and compare its reported CPU and GPU timings with the observed frame rate, using the issue's 5.19 ms CPU and 5.68 ms GPU example as a reference. Determine which timing the FPS value is intended to represent, then make the metric consistent with that definition and verify it against a CPU-heavy scene and RTSS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100