perf(formatter): don't call sort_tailwind_classes if no classes need to be sorted#17698
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #17698 will not alter performanceComparing Summary
Footnotes
|
edce2c8 to
207d327
Compare
85d7bd7 to
5919086
Compare
Merge activity
|
😆 |
…d to be sorted (#17698) If the classes are empty, that means no classes need to be sorted. Then return the original one to avoid calling the JS side, which is quite a costly function. After this, the formatting time went from `8s` to `2s` in the `outline` repo locally.
207d327 to
1aa7591
Compare
5919086 to
c6a99fd
Compare
# Oxlint # Oxfmt ### 🚀 Features - a19cc93 oxfmt: Add debug logging to oxfmt LSP to troubleshoot resolved options at runtime (#17695) (Nicholas Rayburn) ### 🐛 Bug Fixes - 3b4aced formatter: Should not treat multi-type arguments of TSTypeReference as a complex type (#17708) (Dunqing) - dcfdd41 formatter: Should not set up tailwindcss callback when no tailwindcss configuration is set (#17696) (Dunqing) - 6f65901 formatter: Return original classes when there are no tailwindcss classes sort callback (#17689) (Dunqing) ### ⚡ Performance - c6a99fd formatter: Don't call `sort_tailwind_classes` if no classes need to be sorted (#17698) (Dunqing) Co-authored-by: Dunqing <29533304+Dunqing@users.noreply.github.com>

If the classes are empty, that means no classes need to be sorted. Then return the original one to avoid calling the JS side, which is quite a costly function.
After this, the formatting time went from
8sto2sin theoutlinerepo locally.