[webkit-reviews] review requested: [Bug 36373] [Qt] Don't construct a QLineEdit every time when painting a text field : [Attachment 51163] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 19 09:52:41 PDT 2010


Jakub Wieczorek <jwieczorek at webkit.org> has asked  for review:
Bug 36373: [Qt] Don't construct a QLineEdit every time when painting a text
field
https://bugs.webkit.org/show_bug.cgi?id=36373

Attachment 51163: patch
https://bugs.webkit.org/attachment.cgi?id=51163&action=review

------- Additional Comments from Jakub Wieczorek <jwieczorek at webkit.org>
Additionally I included a very basic benchmark I used to measure the gain. I'm
not sure if these results are trustworthy but they are the following. According
to Valgrind, quite a bit of time is spent in QLineEditPrivate::init().

Before:
********* Start testing of tst_Painting *********
Config: Using QTest library 4.7.0, Qt 4.7.0
PASS   : tst_Painting::initTestCase()
RESULT : tst_Painting::textAreas():
     62.415 msecs per iteration (total: 62,416, iterations: 1000)
PASS   : tst_Painting::textAreas()
PASS   : tst_Painting::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_Painting *********

After:
********* Start testing of tst_Painting *********
Config: Using QTest library 4.7.0, Qt 4.7.0
PASS   : tst_Painting::initTestCase()
RESULT : tst_Painting::textAreas():
     46.996 msecs per iteration (total: 46,996, iterations: 1000)
PASS   : tst_Painting::textAreas()
PASS   : tst_Painting::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_Painting *********


More information about the webkit-reviews mailing list