Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Issue 196103013: Pack StyleColor members in StyleRareInheritedData tighter to save memory (Closed)

Created:
6 years, 9 months ago by Jens Widell
Modified:
6 years, 9 months ago
CC:
blink-reviews, zoltan1, dsinclair, bemjb+rendering_chromium.org, eae+blinkwatch, ed+blinkwatch_opera.com, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, pdr., rune+blink, rwlbuis, bulach
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Pack StyleColor members in StyleRareInheritedData tighter to save memory Since StyleColor stores the color value (32-bit RGBA) plus a single flag, it is a bit inefficient. In particular when multiple StyleColor objects are members of another object, there will be a lot of unnecessary padding. This padding can be avoided by storing the color value and the flag as separate members of the containing structure, which allows the flags to be packed into a bitfield. The actual saving from this change, measured in a 64-bit Linux build, is 20 bytes per StyleRareInheritedData object. BUG=356124 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170038

Patch Set 1 #

Patch Set 2 : Simpler approach #

Patch Set 3 : Fix initial isCurrentColor valuse #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -41 lines) Patch
M Source/core/rendering/style/RenderStyle.h View 6 chunks +16 lines, -12 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/rendering/style/StyleRareInheritedData.h View 1 2 chunks +27 lines, -6 lines 0 comments Download
M Source/core/rendering/style/StyleRareInheritedData.cpp View 1 2 6 chunks +32 lines, -20 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Jens Widell
Please take a look when you have a moment. Some comments: - This change doesn't ...
6 years, 9 months ago (2014-03-24 11:39:52 UTC) #1
eae
On 2014/03/24 11:39:52, Jens Lindström wrote: > Please take a look when you have a ...
6 years, 9 months ago (2014-03-24 15:42:07 UTC) #2
Jens Widell
On 2014/03/24 15:42:07, eae wrote: > Wouldn't it be easier just to store Colors instead ...
6 years, 9 months ago (2014-03-24 15:58:41 UTC) #3
eae
On 2014/03/24 15:58:41, Jens Lindström wrote: > On 2014/03/24 15:42:07, eae wrote: > > > ...
6 years, 9 months ago (2014-03-24 16:07:55 UTC) #4
Jens Widell
On 2014/03/24 16:07:55, eae wrote: > Similar to what you're doing but with less magic ...
6 years, 9 months ago (2014-03-24 16:12:45 UTC) #5
eae
On 2014/03/24 16:12:45, Jens Lindström wrote: > On 2014/03/24 16:07:55, eae wrote: > > > ...
6 years, 9 months ago (2014-03-24 16:12:58 UTC) #6
Jens Widell
On 2014/03/24 16:12:58, eae wrote: > On 2014/03/24 16:12:45, Jens Lindström wrote: > > On ...
6 years, 9 months ago (2014-03-24 16:43:46 UTC) #7
eae
On 2014/03/24 16:43:46, Jens Lindström wrote: > On 2014/03/24 16:12:58, eae wrote: > > On ...
6 years, 9 months ago (2014-03-24 16:46:16 UTC) #8
eseidel
How many StyleRareInheritedData objects do we have in a typical page?
6 years, 9 months ago (2014-03-24 17:04:32 UTC) #9
Jens Widell
On 2014/03/24 17:04:32, eseidel wrote: > How many StyleRareInheritedData objects do we have in a ...
6 years, 9 months ago (2014-03-24 17:09:22 UTC) #10
eseidel
Also, if we're going to reduce memory in Blink we should have a bug to ...
6 years, 9 months ago (2014-03-24 22:46:55 UTC) #11
Jens Widell
On 2014/03/24 22:46:55, eseidel wrote: > Also, if we're going to reduce memory in Blink ...
6 years, 9 months ago (2014-03-25 07:29:52 UTC) #12
Jens Widell
On 2014/03/25 07:29:52, Jens Lindström wrote: > On 2014/03/24 22:46:55, eseidel wrote: > > Also, ...
6 years, 9 months ago (2014-03-25 12:30:52 UTC) #13
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 9 months ago (2014-03-26 08:00:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/196103013/40001
6 years, 9 months ago (2014-03-26 08:00:55 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 08:52:15 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-26 08:52:15 UTC) #17
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 9 months ago (2014-03-26 09:11:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/196103013/40001
6 years, 9 months ago (2014-03-26 09:11:22 UTC) #19
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 09:46:10 UTC) #20
Message was sent while issue was closed.
Change committed as 170038

Powered by Google App Engine
This is Rietveld 408576698