Skip to content

perf(nui): make CEF windowless frame rate configurable - #4234

Open
wall3rsyt wants to merge 1 commit into
citizenfx:masterfrom
wall3rsyt:perf/nui-max-framerate
Open

wall3rsyt wants to merge 1 commit into
citizenfx:masterfrom
wall3rsyt:perf/nui-max-framerate

Conversation

@wall3rsyt

Copy link
Copy Markdown

What

  • Replace the hardcoded 240 FPS CEF windowless frame rate with a nui_maxFrameRate convar (default 120, clamped 30-240).

Why / impact

240 FPS is excessive for most NUI pages and burns CPU time on the render thread. A configurable default of 120 lets operators and players reclaim that headroom while still allowing developers to raise the cap when they need smooth animations.

Trade-offs

Default drops from 240 to 120. Pages with sub-frame animations may look slightly different unless the operator sets a higher value.

Testing

Compiled and linked nui-core in a local Debug x64 client build. Not runtime-tested in-game.

The hardcoded 240 FPS windowless frame rate is excessive for most NUI
pages. Add a nui_maxFrameRate convar (default 120, clamped 30-240)
so server operators and players can tune CPU time spent on NUI
rendering to match their actual needs.

Signed-off-by: wall3rsyt <[email protected]>
@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant