Skip to content

Shrink RuleNode by two words #17280

@bholley

Description

@bholley

RuleNode is a frequently-allocated data structure. It lives in components/style/rule_tree/mod.rs

Right now it's 96 bytes on 64-bit platforms. We can shrink this to 80 quite easily.

We should do the following:
(1) Add a size_of test for RuleNode in tests/unit/stylo/size_of.rs.
(2) Change StyleSource to have a "None" variant, and eliminate the Option<> around StyleSource.
(3) Reuse a sibling pointer for free_count, as described in the comment.

CC @nox @jdm @emilio @SimonSapin

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-styloC-assignedThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions