Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(material/radio): Optimize costly css selectors. #30470

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

kseamon
Copy link
Collaborator

@kseamon kseamon commented Feb 11, 2025

Descendant selectors containing :state selectors as ancestors are slow as they require the css engine to check all the way up to the dom root for matching elements. Using child selectors instead limits the scope of these checks to just the direct parent element.

Descendant selectors containing :state selectors as ancestors are slow as they
require the css engine to check all the way up to the dom root for matching elements.
Using child selectors instead limits the scope of these checks to just the direct parent element.
@angular-robot angular-robot bot added area: performance Issues related to performance area: material/radio labels Feb 11, 2025
@kseamon kseamon marked this pull request as ready for review February 12, 2025 15:23
@kseamon kseamon requested a review from a team as a code owner February 12, 2025 15:23
@kseamon kseamon requested review from crisbeto and wagnermaciel and removed request for a team February 12, 2025 15:23
@andrewseguin andrewseguin added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Feb 13, 2025
@andrewseguin andrewseguin merged commit 6bd31f9 into angular:main Feb 13, 2025
26 of 28 checks passed
@andrewseguin
Copy link
Contributor

The changes were merged into the following branches: main, 19.1.x

andrewseguin pushed a commit that referenced this pull request Feb 13, 2025
Descendant selectors containing :state selectors as ancestors are slow as they
require the css engine to check all the way up to the dom root for matching elements.
Using child selectors instead limits the scope of these checks to just the direct parent element.

(cherry picked from commit 6bd31f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: material/radio area: performance Issues related to performance target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants