Closed
Bug 1364952
Opened 7 years ago
Closed 7 years ago
stylo: Use a SmallVec when gathering applicable declarations
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: bholley, Assigned: bholley)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
(deleted),
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
(deleted),
text/plain
|
Details |
We've been meaning to fix this for a while, and Julian's profiling raised this as an enormous source of transient allocations.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8867769 -
Flags: review?(emilio+bugs)
Assignee | ||
Comment 2•7 years ago
|
||
We could considering shrinking this to 8, since julian's testing found that we basically never write to the upper 8 slots on the obama testcase. On the other hand, it may depend a lot on the stylesheet.
Comment 3•7 years ago
|
||
Comment on attachment 8867769 [details] [diff] [review] Use a SmallVec when gathering applicable declarations. v1 Review of attachment 8867769 [details] [diff] [review]: ----------------------------------------------------------------- ::: servo/components/style/matching.rs @@ +865,5 @@ > } > } > > fn compute_rule_node<E: TElement>(rule_tree: &RuleTree, > + applicable_declarations: &mut SmallVec<[ApplicableDeclarationBlock; 16]>, Could we perhaps make this a typedef? type ApplicableDeclarationsList = SmallVec<[ApplicableDeclarationBlock; 16]>; (Perhaps with a comment or something re. the reasoning and the allocator measurements). Also, perhaps it's worth to change the one in lazy_pseudo_rules, what do you think?
Attachment #8867769 -
Flags: review?(emilio+bugs) → review+
Assignee | ||
Comment 4•7 years ago
|
||
Sure, will do on both counts.
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Is there a way to get hold of the patch that is associated with the NEW->RESOLVED transition above? It doesn't seem to be in m-i right now.
Assignee | ||
Comment 7•7 years ago
|
||
Sorry, I realized I never pasted the PR in the bug. Normally I do that: https://github.com/servo/servo/pull/16874 (1): pull autoland (2): git log (3): search in your pager for 16874 (4) figure out whether that commit is in central by the same procedure. Appears not to have merged yet, in this case.
You need to log in
before you can comment on or make changes to this bug.
Description
•