[Webkit-unassigned] [Bug 112345] New: [Qt] requestAnimationFrame performance issues

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 14 07:17:13 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=112345

           Summary: [Qt] requestAnimationFrame performance issues
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: milian.wolff at kdab.com


See also: https://lists.webkit.org/pipermail/webkit-qt/2013-March/003546.html

Short version is: window.requestAnimationFrame has performance issues on QtWebKit and performs worse than a simple window.setTimeout approach.

Code to reproduce the issue:

``` test.qml ```
import QtQuick 2.0
import QtWebKit 3.0
import QtWebKit.experimental 1.0

WebView {
  id: webView
  height: 500
  width: 500
  url: "test.html"
  experimental {
    preferences.developerExtrasEnabled: true
  }
}
``````

``` test.html ```
<DOCTYPE html>
<html>
  <head>
    <title>rAF test</title>
    <script type="text/javascript">
      function animateRAF() {
        window.requestAnimationFrame(animateRAF);
      }
      function animateTimer() {
        window.setTimeout(17, animateTimer)
      }
      // abysmal performance
      window.onload = animateRAF;
      // nice performance
      // window.onload = animateTimer;
    </script>
  <body>
    <h1>rAF test</h1>
  </body>
</html>
``````

The animateRAF version above makes my system noticeably sluggish and I see a high CPU load:
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM     TIME+ COMMAND                                                                        
25016 milian    20   0 2578m  55m  36m S  54.9  0.7   0:10.93 qmlscene                                                                       
  312 root      20   0  206m  92m  65m S  48.2  1.2   8:41.84 X                                                                              
25024 milian    30  10 1827m  48m  38m S  12.0  0.6   0:01.89 QtWebProcess

Using animateTimer instead I do not see any of the above processed in the top 20 of top at all.

I am using a git checkout of WebKit master with bd8ce398ed4dd2ce92f8db61d7e97b43a534297a, i.e. https://bugs.webkit.org/show_bug.cgi?id=112095 applied. That helped a bit but rAF is still unusable for me.

perf top -G, while running the rAF version of the above, shows this:

-  46.09%  [kernel]                             [k] ioread32                                                                                ◆
   - ioread32                                                                                                                               ▒
      - 53.13% 0xffffffffa05e80f6                                                                                                           ▒
         - 68.79% nouveau_gem_ioctl_pushbuf                                                                                                 ▒
              0xffffffffa02ee3f3                                                                                                            ▒
              do_vfs_ioctl                                                                                                                  ▒
              sys_ioctl                                                                                                                     ▒
              system_call_fastpath                                                                                                          ▒
              __GI___ioctl                                                                                                                  ▒
         - 31.21% nv84_fence_sync                                                                                                           ▒
              nouveau_fence_sync                                                                                                            ▒
              validate_sync.isra.3                                                                                                          ▒
              validate_list                                                                                                                 ▒
              nouveau_gem_ioctl_pushbuf                                                                                                     ▒
              drm_ioctl                                                                                                                     ▒
              do_vfs_ioctl                                                                                                                  ▒
              sys_ioctl                                                                                                                     ▒
              system_call_fastpath                                                                                                          ▒
              __GI___ioctl                                                                                                                  ▒
        34.81% _nouveau_gpuobj_rd32                                                                                                         ▒
           nv84_fence_read                                                                                                                  ▒
           nouveau_fence_done                                                                                                               ▒
        9.60% nouveau_dma_wait                                                                                                              ▒
        1.17% nv50_crtc_cursor_set                                                                                                          ▒
           drm_mode_cursor_ioctl                                                                                                            ▒
           drm_ioctl                                                                                                                        ▒
           do_vfs_ioctl                                                                                                                     ▒
           sys_ioctl                                                                                                                        ▒
           system_call_fastpath                                                                                                             ▒
           __GI___ioctl                                                                                                                     ▒
        0.88% nv50_vm_flush

I.e. the painting seems to be an issue. So apparently rAF triggers excessive repaints. Is this maybe also a driver problem of noveau?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list