Bug 284823
| Summary: | [Win] requestAnimationFrame can't reach display refresh rate | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ian Grunert <ian.grunert> |
| Component: | Web Template Framework | Assignee: | Fujii Hironori <fujii.hironori> |
| Status: | REOPENED | ||
| Severity: | Normal | CC: | commit-queue, fujii.hironori, randy.luecke, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Windows 11 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=291217 | ||
| Bug Depends on: | 290655, 291226 | ||
| Bug Blocks: | |||
Ian Grunert
Test site: https://www.mobzystems.com/online/measure-browser-animation-speed/
WebKit MiniBrowser gets about 35fps on this test, well below the 60fps on Firefox. SetTimer / WM_TIMER used within RunLoopWin has a granularity of about 10ms and is likely bottlenecking our ability to hit 60fps on requestAnimationFrame.
Chromium uses MsgWaitForMultipleObjectsEx in it's run loop to deal with this limitation: https://source.chromium.org/chromium/chromium/src/+/main:base/message_loop/message_pump_win.cc;l=467-485?q=WM_TIMER&ss=chromium%2Fchromium%2Fsrc
Adopting something similar in WebKit's RunLoopWin would improve performance for WebGL apps such as https://webglsamples.org/aquarium/aquarium.html
Seems like bug 211711 may be related.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/141996589>
Ian Grunert
Pull request: https://github.com/WebKit/WebKit/pull/42936
EWS
Committed 292846@main (70d5b92d1370): <https://commits.webkit.org/292846@main>
Reviewed commits have been landed. Closing PR #42936 and removing active labels.
WebKit Commit Bot
Re-opened since this is blocked by bug 290655
Fujii Hironori
Pull request: https://github.com/WebKit/WebKit/pull/43244
EWS
Committed 292977@main (b376a535708e): <https://commits.webkit.org/292977@main>
Reviewed commits have been landed. Closing PR #43244 and removing active labels.
WebKit Commit Bot
Re-opened since this is blocked by bug 291226
Fujii Hironori
I think RunLoop should have two modes for Windows. One mode uses WM_TIMER for UI process main thread. Another mode uses MsgWaitForMultipleObjectsEx for other thread.