Skip to content

Add a setting for maximum FPS limit #3045

Open
@jf908

Description

@jf908

Description

Webview2 is a good target for web games because I've measured significantly lower input latency (time from mouse input to an update on screen) compared to Chrome and Electron apps.

The input latency can be be decreased even more with the --disable-frame-rate-limit additional browser argument but on many systems this slows down the application significantly, presumably because it's thrashing from the 1000s of updates it's doing per second. The optimization is small but noticeable when controlling a first person camera view with the mouse.

Describe the solution you'd like and alternatives you've considered

A setting that allows the FPS to exceed the monitor's refresh rate while still being capped to a maximum value through an additional browser arg or any kind of Webview2 setting API would be a great way to minimise latency input latency for web games.

This update frequency cannot be controlled from JavaScript because there is some kind of throttling mechanism with requestAnimationFrame which stops you from delaying updates until a later time. requestAnimationFrame's update frequency can only be controlled at a browser level and the current options are either the monitor's refresh rate or no limit at all.

I hope this can be considered but it's understandable if this is a problem with Chromium that can't be resolved by Webview2.

AB#42564118

Metadata

Metadata

Assignees

Labels

feature requestfeature requesttrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions