RESOLVED FIXED Bug 69331
Shrink StyleRareNonInheritedData.
https://bugs.webkit.org/show_bug.cgi?id=69331
Summary Shrink StyleRareNonInheritedData.
Andreas Kling
Reported 2011-10-04 04:22:44 PDT
We can shrink StyleRareNonInheritedData by two CPU words if we rearrange its members. This would cut memory usage by 140 kB (on 64-bit) when loading the full HTML5 spec.
Attachments
Proposed patch (9.16 KB, patch)
2011-10-04 04:37 PDT, Andreas Kling
koivisto: review+
webkit-ews: commit-queue-
Patch for landing (r=anttik) (9.07 KB, patch)
2011-10-04 07:16 PDT, Andreas Kling
no flags
Follow-up patch to make enum bitfields explicitly unsigned. (1.72 KB, patch)
2011-10-04 10:54 PDT, Andreas Kling
darin: review+
Andreas Kling
Comment 1 2011-10-04 04:37:36 PDT
Created attachment 109606 [details] Proposed patch
Early Warning System Bot
Comment 2 2011-10-04 04:47:44 PDT
Comment on attachment 109606 [details] Proposed patch Attachment 109606 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/9944281
Antti Koivisto
Comment 3 2011-10-04 06:12:00 PDT
Comment on attachment 109606 [details] Proposed patch r=me if you fix whatever Qt bot is whining about.
WebKit Review Bot
Comment 4 2011-10-04 06:20:50 PDT
Comment on attachment 109606 [details] Proposed patch Attachment 109606 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9936528 New failing tests: plugins/fullscreen-plugins-dont-reload.html
Andreas Kling
Comment 5 2011-10-04 07:15:09 PDT
Comment on attachment 109606 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=109606&action=review > Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:69 > + printf("sizeof(StyleRareNonInheritedData) = %lu\n", sizeof(StyleRareNonInheritedData)); Looks like I pulled an Antti here. :)
Andreas Kling
Comment 6 2011-10-04 07:16:43 PDT
Created attachment 109619 [details] Patch for landing (r=anttik)
WebKit Review Bot
Comment 7 2011-10-04 08:12:52 PDT
Comment on attachment 109619 [details] Patch for landing (r=anttik) Clearing flags on attachment: 109619 Committed r96594: <http://trac.webkit.org/changeset/96594>
WebKit Review Bot
Comment 8 2011-10-04 08:12:56 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 9 2011-10-04 10:30:30 PDT
Comment on attachment 109606 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=109606&action=review > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:132 > + RegionOverflow m_regionOverflow : 1; Won’t we run into signed/unsigned problems with this with the Windows compiler? > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:140 > + PageSizeType m_pageSizeType : 2; > + ETransformStyle3D m_transformStyle3D : 1; > + EBackfaceVisibility m_backfaceVisibility : 1; Won’t we run into signed/unsigned problems with these with the Windows compiler?
Andreas Kling
Comment 10 2011-10-04 10:39:50 PDT
(In reply to comment #9) > (From update of attachment 109606 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=109606&action=review > > > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:132 > > + RegionOverflow m_regionOverflow : 1; > > Won’t we run into signed/unsigned problems with this with the Windows compiler? > > > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:140 > > + PageSizeType m_pageSizeType : 2; > > + ETransformStyle3D m_transformStyle3D : 1; > > + EBackfaceVisibility m_backfaceVisibility : 1; > > Won’t we run into signed/unsigned problems with these with the Windows compiler? Will we? I was not aware of this issue. CC'ing Adam who might know more.
Antti Koivisto
Comment 11 2011-10-04 10:41:18 PDT
(In reply to comment #9) > Won’t we run into signed/unsigned problems with these with the Windows compiler? Oh is that the reason why we have so many enum fields specified as "unsigned"? I didn't know.
Darin Adler
Comment 12 2011-10-04 10:44:02 PDT
(In reply to comment #11) > (In reply to comment #9) > > Won’t we run into signed/unsigned problems with these with the Windows compiler? > > Oh is that the reason why we have so many enum fields specified as "unsigned"? Yes.
Adam Roben (:aroben)
Comment 13 2011-10-04 10:47:00 PDT
Andreas Kling
Comment 14 2011-10-04 10:54:14 PDT
Created attachment 109648 [details] Follow-up patch to make enum bitfields explicitly unsigned. Here we go. Thanks a bunch for pointing this out!
Vangelis Kokkevis
Comment 15 2011-10-04 22:41:10 PDT
(In reply to comment #10) > (In reply to comment #9) > > (From update of attachment 109606 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=109606&action=review > > > > > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:132 > > > + RegionOverflow m_regionOverflow : 1; > > > > Won’t we run into signed/unsigned problems with this with the Windows compiler? > > > > > Source/WebCore/rendering/style/StyleRareNonInheritedData.h:140 > > > + PageSizeType m_pageSizeType : 2; > > > + ETransformStyle3D m_transformStyle3D : 1; > > > + EBackfaceVisibility m_backfaceVisibility : 1; > > > > Won’t we run into signed/unsigned problems with these with the Windows compiler? > > Will we? I was not aware of this issue. CC'ing Adam who might know more. Definitely an issue with the windows compiler. It did break Chrome on windows where the preserves3d property stopped working due to a (-1 != 1 comparison). Thanks for checking in a fix.
Andreas Kling
Comment 16 2011-10-05 04:18:49 PDT
Note You need to log in before you can comment on or make changes to this bug.