Skip to content

Performance TIME_PROCESS doesn't report correct value when Project Setting's application/run/max_fps is set to zero or >= monitor refresh rate. #118935

@pegasusearl

Description

@pegasusearl

Feature Link: https://docs.godotengine.org/en/stable/classes/class_performance.html

Tested versions

v4.6.2.stable.official [71f334935]

System information

Godot v4.6.2.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4060 (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) Ultra 7 265K (20 threads) - 47.27 GiB memory

Issue description

When application/run/max_fps in Project Settings is set to 0, or set to value equal or above the monitor's refresh rate, the Performance.get_monitor(Performance.TIME_PROCESS) doesn't seem to give us the correct frame time, but instead time between render frame, like delta in _process().

When this value is giving correct value, it can be useful to maintain steady fps by adjusting graphic settings.

Steps to reproduce

  1. Open the MRP with Godot.
  2. Run the project.

Since max_fps is currently set to 0, the time process label will show you the wrong number.

  1. Now stop the project.
  2. Go to Project Settings > Application > Run.
  3. Set Max FPS to any number between 0 to your monitor's framerate (exclusive). For example if your monitor is 60hz, change the value to 59.
  4. Now run the project.

Now it will not show delay between frames, but instead a small number, which I assume is the correct frame's render time.

Minimal reproduction project (MRP)

godot-perfmon-bug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions