Significant performance hit when :has selectors enabled in Firefox
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 186
- Avg merge
- 1d 36m
- Merged PRs (30d)
- 11
Description
**Describe the bug**
After Firefox shipped `:has` selector in the recent version, Phanpy performance has worsened severely, which is visible by page frequently freezing and overall feeling unresponsive especially with many elements on the screen.
It seems that Phanpy either uses `:has` selectors in a manner that is very expensive or does something else that causes Firefox to invalidate a huge amount of styles. Perhaps it's the same in Chromium browsers too.
![32.0ms spent on Styles. Diagnostics: Elements traversed - 331; Elements styled - 321; Elements matched - 298; Styles shared - 23; Styles reused - 0; Thread - phanpy.social (2/5); Page - phanpy.social. Stack: First invalidated 9.782ms before the flush, at: style::invalidation::element::invalidator::TreStyleInvalidator
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.