mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Shrink ElementData by moving pseudo count to type
`ElementStyles` holds an optional list of values for each eager pseudo-element. However, the type was declared as a slice instead of a fixed size array, so an extra 8 bytes were being allocated to hold the size, even though it never changes. Moving the constant size into the type reduces `ElementStyles` and `ElementData` by 8 bytes. MozReview-Commit-ID: GaO6DKFxUMo
This commit is contained in:
parent
2b5c56e6a8
commit
87c51bd8bf
2 changed files with 21 additions and 5 deletions
|
@ -32,9 +32,9 @@ size_of_test!(test_size_of_rule, style::stylist::Rule, 32);
|
|||
size_of_test!(test_size_of_option_arc_cv, Option<Arc<ComputedValues>>, 8);
|
||||
size_of_test!(test_size_of_option_rule_node, Option<StrongRuleNode>, 8);
|
||||
|
||||
size_of_test!(test_size_of_element_styles, ElementStyles, 24);
|
||||
size_of_test!(test_size_of_element_styles, ElementStyles, 16);
|
||||
size_of_test!(test_size_of_restyle_data, RestyleData, 8);
|
||||
size_of_test!(test_size_of_element_data, ElementData, 32);
|
||||
size_of_test!(test_size_of_element_data, ElementData, 24);
|
||||
|
||||
size_of_test!(test_size_of_property_declaration, style::properties::PropertyDeclaration, 32);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue