<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>284823</bug_id>
          
          <creation_ts>2024-12-17 09:16:57 -0800</creation_ts>
          <short_desc>[Win] requestAnimationFrame can&apos;t reach display refresh rate</short_desc>
          <delta_ts>2025-04-07 23:26:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 11</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=291217</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>290655</dependson>
    
    <dependson>291226</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian Grunert">ian.grunert</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fujii</cc>
    
    <cc>randy.luecke</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2082362</commentid>
    <comment_count>0</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2024-12-17 09:16:57 -0800</bug_when>
    <thetext>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&apos;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&amp;ss=chromium%2Fchromium%2Fsrc

Adopting something similar in WebKit&apos;s RunLoopWin would improve performance for WebGL apps such as https://webglsamples.org/aquarium/aquarium.html

Seems like bug 211711 may be related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083801</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-12-24 09:17:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/141996589&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105604</commentid>
    <comment_count>2</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2025-03-24 09:40:46 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/42936</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106920</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-28 12:51:42 -0700</bug_when>
    <thetext>Committed 292846@main (70d5b92d1370): &lt;https://commits.webkit.org/292846@main&gt;

Reviewed commits have been landed. Closing PR #42936 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106958</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2025-03-28 15:18:23 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 290655</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107101</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-03-29 05:53:13 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/43244</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107638</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-31 16:59:59 -0700</bug_when>
    <thetext>Committed 292977@main (b376a535708e): &lt;https://commits.webkit.org/292977@main&gt;

Reviewed commits have been landed. Closing PR #43244 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109533</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2025-04-07 14:38:28 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 291226</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109649</commentid>
    <comment_count>8</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-04-07 23:26:06 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>