-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
Fix at-rule-property-required-list
performance
#6865
Fix at-rule-property-required-list
performance
#6865
Conversation
🦋 Changeset detectedLatest commit: f007bb2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ce--sincere-bandicoot-44f1ae6a59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark on my local machine
M1 MacBook Pro / Node.js v20.2.0
npm run benchmark-rule -- at-rule-property-required-list '{"font-face": ["font-display", "font-family", "font-style"], "page": "margin"}'
Before
Warnings: 20
Mean: 81.61474988235294 ms
Deviation: 6.212360461737067 ms
After
Warnings: 20
Mean: 82.71980147058825 ms
Deviation: 11.136367856858897 ms
Yeah, the difference is very small. I am fine with dropping this change. I also tested with something that has more hits and even then it isn't clear which is faster :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problems. Thank you for creating this pull request! 👍🏼
Even if the improvement is small, the new code is more readable and adds a new utility to be able to improve other rules.
See:
In this
at-rule-property-required-list
two types of work were less than ideal :