Chromium Code Reviews
DescriptionChange CSSImageValue's member variables from String to AtomicString
Before this patch, CSSImageValue has two String member variables for
URLs (a relative URL and an absolute URL). This means that there should
be two StringImpl objects for one CSSImageValue, even when they are same
URLs. This could be a problem when the URL is a very long data URL and
more memory could be consumed than necessary. Actually, this is the case
on GMail site on mobile platforms and about 136 [KiB] can be saved by this
CL on GMail.
This CL changes them from String to AtomicString so that they can share
a StringImpl object when the two URLs are same to reduce memory.
Note: I created this CL based on the result of memory-usage investigation
in Blink:
https://docs.google.com/document/d/1XnN8RAOJDeoiNR9A4LqaUt4PQ3GXLPUJUzVIY49oRRg/edit#
We found that there were two duplicated big data-url on GMail and
CSSImageValue's implementation was culprit.
BUG=n/a
TEST=n/a; no behavior change
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=202511
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 2
Patch Set 4 : Timothy's review #Patch Set 5 : (rebase) #
Messages
Total messages: 19 (7 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||