Bug 85834

Summary: Fix performance regression for floats caused by LayoutUnit change
Product: WebKit Reporter: Emil A Eklund <eae>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, leviw, ojan, rakuco, rniwa, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch
none
Patch for landing
none
Patch for landing none

Attachments
Patch (26.63 KB, patch)
2012-05-07 15:28 PDT, Emil A Eklund
no flags
Patch for landing (26.62 KB, patch)
2012-05-07 16:10 PDT, Emil A Eklund
no flags
Patch (18.38 KB, patch)
2012-05-08 16:59 PDT, Levi Weintraub
no flags
Patch for landing (20.31 KB, patch)
2012-05-09 10:38 PDT, Levi Weintraub
no flags
Patch for landing (20.62 KB, patch)
2012-05-09 11:29 PDT, Levi Weintraub
no flags
Emil A Eklund
Comment 1 2012-05-07 15:28:02 PDT
Eric Seidel (no email)
Comment 2 2012-05-07 15:33:10 PDT
Comment on attachment 140605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140605&action=review OK. So does this get us back the whole speed loss? > Source/WebCore/platform/FractionalLayoutUnit.h:324 > +#if ENABLE(SUBPIXEL_LAYOUT) Presumably there is still a regression for ports with this enabled?
Eric Seidel (no email)
Comment 3 2012-05-07 15:33:32 PDT
Comment on attachment 140605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140605&action=review >> Source/WebCore/platform/FractionalLayoutUnit.h:324 >> +#if ENABLE(SUBPIXEL_LAYOUT) > > Presumably there is still a regression for ports with this enabled? Also, this multiply is not very bounded anymore... :)
Emil A Eklund
Comment 4 2012-05-07 15:38:42 PDT
Comment on attachment 140605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140605&action=review It should get us back most of the lost performance. I'll post numbers before committing. >>> Source/WebCore/platform/FractionalLayoutUnit.h:324 >>> +#if ENABLE(SUBPIXEL_LAYOUT) >> >> Presumably there is still a regression for ports with this enabled? > > Also, this multiply is not very bounded anymore... :) Yes, we plan to address that separately before turning on the flag. We have a couple of ideas but need some more time validating them.
Ryosuke Niwa
Comment 5 2012-05-07 15:40:34 PDT
Comment on attachment 140605 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140605&action=review > Source/WebCore/ChangeLog:19 > + Disable the use of 64bit (long long) math ni the case where the fraction Nit: ni.
Emil A Eklund
Comment 6 2012-05-07 16:02:05 PDT
For floats_50_100_nested and floats_20_100_nested this patch seems to get back the entire speed loss. For floats_2_100_nested on the other hand we get back about 60%.
Emil A Eklund
Comment 7 2012-05-07 16:05:56 PDT
Unless anyone objects I plan to commit this and see what our perf bots thinks. If it fails to adequately address the regression I'll roll out the LayoutUnit change.
Emil A Eklund
Comment 8 2012-05-07 16:10:03 PDT
Created attachment 140613 [details] Patch for landing
WebKit Review Bot
Comment 9 2012-05-07 21:11:31 PDT
Comment on attachment 140613 [details] Patch for landing Clearing flags on attachment: 140613 Committed r116392: <http://trac.webkit.org/changeset/116392>
WebKit Review Bot
Comment 10 2012-05-07 21:11:36 PDT
All reviewed patches have been landed. Closing bug.
Ojan Vafai
Comment 11 2012-05-08 11:11:54 PDT
Unfortunately, this doesn't seem to have worked. :(
Darin Adler
Comment 12 2012-05-08 12:46:15 PDT
Comment on attachment 140613 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=140613&action=review > Source/WebCore/ChangeLog:11 > + Fix performance regression caused by r116009 by disabling the use of > + 64bit math in FractionalLayoutUnit, simplifying the pixelSnappedMaxX/Y > + math, inlining a couple of methods and replacing the literal 0 (zero) > + with ZERO_LAYOUT_UNIT. Did you verify that the 0 -> ZERO_LAYOUT_UNIT change actually affected performance? I find that highly dubious, so I want to be sure it actually happened!
Levi Weintraub
Comment 13 2012-05-08 16:59:59 PDT
Created attachment 140820 [details] Patch Another try at addressing the performance regressions after 116009.
WebKit Review Bot
Comment 14 2012-05-08 17:02:10 PDT
Attachment 140820 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/FractionalLayoutRect.h:187: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Levi Weintraub
Comment 15 2012-05-08 17:15:31 PDT
(In reply to comment #14) > Attachment 140820 [details] did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 > Source/WebCore/platform/graphics/FractionalLayoutRect.h:187: Place brace on its own line for function definitions. [whitespace/braces] [4] > Total errors found: 1 in 4 files > > > If any of these errors are false positives, please file a bug against check-webkit-style. Thanks for the review, Ojan. I'll fix the style error and am waiting for the EWS bots to validate since I mucked with build files.
Build Bot
Comment 16 2012-05-08 17:31:19 PDT
Adele Peterson
Comment 17 2012-05-08 17:47:05 PDT
Build Bot
Comment 18 2012-05-08 18:30:39 PDT
Build Bot
Comment 19 2012-05-08 18:40:45 PDT
Gyuyoung Kim
Comment 20 2012-05-08 18:58:53 PDT
Levi Weintraub
Comment 21 2012-05-09 10:38:08 PDT
Created attachment 140972 [details] Patch for landing
WebKit Review Bot
Comment 22 2012-05-09 11:07:19 PDT
Attachment 140972 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebCore/ChangeLog:18: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Levi Weintraub
Comment 23 2012-05-09 11:29:25 PDT
Created attachment 140985 [details] Patch for landing
WebKit Review Bot
Comment 24 2012-05-09 12:35:23 PDT
Comment on attachment 140985 [details] Patch for landing Clearing flags on attachment: 140985 Committed r116549: <http://trac.webkit.org/changeset/116549>
WebKit Review Bot
Comment 25 2012-05-09 12:35:32 PDT
All reviewed patches have been landed. Closing bug.
Levi Weintraub
Comment 26 2012-05-09 12:37:46 PDT
(In reply to comment #25) > All reviewed patches have been landed. Closing bug. I'll be monitoring the perf bots and if we don't see improvement, I'll roll back 116009 pending further investigation.
Note You need to log in before you can comment on or make changes to this bug.