Repository navigation
Experiment with bulk Ruff cache metadata on macOS - #28300
Closed
charliermarsh wants to merge 1 commit into
Closed
charliermarsh wants to merge 1 commit into
charliermarsh wants to merge 1 commit into
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 97.84%. The percentage of expected errors that received a diagnostic held steady at 96.45%. The number of fully passing files held steady at 128/145. |
Memory usage reportMemory usage unchanged ✅ |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Explore reading the modification times and permissions needed for Ruff's file-cache keys with macOS
getattrlistbulk, following astral-sh/uv#21344. We group selected files by parent directory after discovery and prefetch keys for directories with multiple selected files. Symlinks, unsupported attributes, and failed bulk reads retain individual metadata lookups. Prefetched keys are consumed once, and formatting still fetches fresh metadata after writing a file.This implementation has not demonstrated a performance improvement. It adds a directory scan after the
ignorewalk, plus maps for the prefetched keys. A local paired run produced these median full-command times:These are synthetic measurements on macOS 26.6.2 using optimized development builds, with ten measured runs per binary in ABBA order after three warmups. Each file contains
value = 1; configuration discovery is disabled to isolate cache handling, and command output matches. The machine was shared and not idle, so the magnitudes are provisional. The comparison base is6077dc3d7d.The extra scan is a likely reason the reduced metadata-call count does not translate into a win here. Integrating metadata collection with the existing directory enumeration needs investigation before considering this a performance improvement.