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

[REG 4.8->5.x]: QPainterPath::createStroke() performs badly in comparison to Qt 4.8

    XMLWordPrintable

Details

    • 5322998a0ba80b1e095340245ddb00aaf5947be9 (qt/qtbase/5.12)

    Description

      In Qt 5 the difference of the time taken to run QPainterPath::createStroke() is considerably higher than it was in Qt 4.8. The example attached gives the following results:

      Qt 4.8.7
      [100] QPainterPath cg_graphicsItem_shapeFromPath_test(const QPainterPath &, const QPen &)
       Time: 0 s, 117 ms, 117039 us 117039060 ns
       Avg: 0 s, 1 ms, 1170 us 1170390 ns
      [100] QPainterPath createLPath()
       Time: 0 s, 18 ms, 18010 us 18010151 ns
       Avg: 0 s, 0 ms, 180 us 180101 ns
      [1] void test()
       Time: 0 s, 141 ms, 141987 us 141987503 ns
       Avg: 0 s, 141 ms, 141987 us 141987503 ns
      
      Qt 5.12.4 - Qt 5.13.0
      [100] QPainterPath cg_graphicsItem_shapeFromPath_test(const QPainterPath &, const QPen &)
       Time: 13 s, 13303 ms, 13303568 us 13303568694 ns
       Avg: 0 s, 133 ms, 133035 us 133035686 ns
      [100] QPainterPath createLPath()
       Time: 0 s, 13 ms, 13119 us 13119794 ns
       Avg: 0 s, 0 ms, 131 us 131197 ns
      [1] void test()
      Time: 13 s, 13319 ms, 13319478 us 13319478352 ns
      Avg: 13 s, 13319 ms, 13319478 us 13319478352 ns
      

      Note the example tests the whole creation of the QPainterPathStroker as well as setting it up, but the same is done for the Qt 4.8 approach too.

      Attachments

        For Gerrit Dashboard: QTBUG-77241
        # Subject Branch Project Status CR V

        Activity

          People

            hkhang Hyunkook Khang
            andysh Andy Shaw
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes