-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
formatterRelated to the formatterRelated to the formatter
Description
There's a lot of optimization opportunities with the formatter with a hot cache (the example is apache airflow with rayon removed):
- Sorting the result takes a long time so does building the result vec, even though we know its approximate size
- Don't read source files in formatter when there is a cache hit #8132
- Deserializing the cache takes noticeable time even if we just need 4k paths plus timestamps
- We first iterate over each directory only to check the timestamps later, could those be combined?
Instructions for generating the flamegraph:
- Install perf and
cargo install flamegraph - git clone apache airflow
- Apply https://gist.github.com/konstin/2e8c45c7f1fa53dc003833870226bab8
flamegraph -F 9999 -- target/release-debug/ruff format ../airflow/(Set your cpu to powersave for more samples)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatter
