Bug 118046 - RuleSet should use malloc rather than Vector
Summary: RuleSet should use malloc rather than Vector
Status: RESOLVED LATER
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-06-26 00:08 PDT by Ryosuke Niwa
Modified: 2021-02-04 22:10 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-06-26 00:08:14 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/5a58b6e748460a8a5e83e8d841e984bed3de1013

The lion's share of the memory used by the style resolver is in the RuleSet
objects. Prior to this CL, these objects were structured as a HashMap from
AtomicStrings to pointers to vectors of RuleData. This CL simplifies this
object graph by removing a layer of indirection. Now we just have a HashMap
from AtomicStrings to an array of RuleDatas.

Rather than use a length to terminate the iteration over the Vector, this CL
uses a bit in RuleData to mark the end of the array. Together with removing the
extra pointer, this CL saves 15 kB on Mobile Gmail.
Comment 2 Ryosuke Niwa 2021-02-04 22:10:55 PST
I doubt this is relevant anymore.