Skip to content

Build a node's CSS ancestry only when a selector needs it - #95

Merged
trissim merged 2 commits into
mainfrom
perf/declared-css-path-demand-20261007
Oct 7, 2026
Merged

trissim merged 2 commits into
mainfrom
perf/declared-css-path-demand-20261007

Conversation

@trissim

@trissim trissim commented Oct 7, 2026 •

Copy link
Copy Markdown

Stylesheet.apply always built the full CSS path for a node. It now checks the matching rules, and if every selector group is compound (addresses the node alone), it uses only the node itself. The cache key path is built only on the first miss. A new test checks that a plain .leaf rule never reads css_path_nodes.

@trissim
trissim marked this pull request as ready for review October 7, 2026 13:45
Copilot AI balanced review requested due to automatic review settings October 7, 2026 13:45
@trissim
trissim merged commit df60dab into main Oct 7, 2026
1 of 22 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim trissim changed the title Derive stylesheet path demand from original selector declarations Build a node's CSS ancestry only when a selector needs it Oct 11, 2026
@trissim
trissim deleted the perf/declared-css-path-demand-20261007 branch October 11, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants