Bug 284823

Summary: [Win] requestAnimationFrame can't reach display refresh rate
Product: WebKit Reporter: Ian Grunert <ian.grunert>
Component: Web Template FrameworkAssignee: 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
Reported 2024-12-17 09:16:57 PST
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
Radar WebKit Bug Importer
Comment 1 2024-12-24 09:17:13 PST
Ian Grunert
Comment 2 2025-03-24 09:40:46 PDT
EWS
Comment 3 2025-03-28 12:51:42 PDT
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
Comment 4 2025-03-28 15:18:23 PDT
Re-opened since this is blocked by bug 290655
Fujii Hironori
Comment 5 2025-03-29 05:53:13 PDT
EWS
Comment 6 2025-03-31 16:59:59 PDT
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
Comment 7 2025-04-07 14:38:28 PDT
Re-opened since this is blocked by bug 291226
Fujii Hironori
Comment 8 2025-04-07 23:26:06 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.