Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34855

Html 5 stroke() is much slower in Qt 5 than in Qt 4.8.x

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.1
    • 5.1.0 , 5.2.0 Beta1
    • WebKit
    • None
    • cd3b33ac489a22c23d2d0a94c8df2b87a8b34eb9

    Description

      Drawing a lot of lines (for example a triangular wave with short wave length) with stroke() on html 5 canvas takes really long time in Qt5 compared to Qt4.8.x. The problem can be reproduced with the attached html/javascript file (testijs.html) in Qt's Fancy Browser example. Just open the file and wait until it is rendered. In Qt 4.8.x it takes a couple of seconds and in Qt5 it takes around 30 seconds on Windows 7.

      I also ran the javascript through the http://jsperf.com/ performance test and it gave the following results (on Windows 7):
      FancyBrowser Qt5.1.0: 1.68 operations/sec
      FancyBrowser Qt4.8.5: 8.08 operations/sec
      Chrome(for reference): 12.60 operations/sec

      This has been tested in Qt 5.0, 5.1.1, 5.2 with or without OpenGL support, in release and in debug builds, and on Windows, Linux and Mac.

      Attachments

        1. testijs.html
          0.6 kB
        2. Patch-strokePath.diff
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes