Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.3, 5.9.8, 5.12.4, 5.13.0
-
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 |
270350,2 | Limit curve stroking threshold to reasonable range | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |