-
-
Notifications
You must be signed in to change notification settings - Fork 34
perf: cache canonicalization results at every recursion level #843
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
Conversation
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #843 +/- ##
==========================================
- Coverage 93.98% 93.88% -0.10%
==========================================
Files 17 17
Lines 3090 3091 +1
==========================================
- Hits 2904 2902 -2
- Misses 186 189 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
36df5e0 to
1c9f519
Compare
CodSpeed Performance ReportMerging #843 will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
Broke in #834 Moves path.canonicalized.get_or_init() from canonicalize_impl() into the recursive canonicalize_with_visited() function. This enables caching of parent directory canonicalization results, which are then reused when canonicalizing sibling paths. Performance impact (measured with many example on monitor-oxc): - Total filesystem syscalls: 124,071 → 39,296 (-68.3%) - symlink_metadata calls: 99,169 → 17,503 (-82.4%) - read_link calls: 6,127 → 3,018 (-50.7%) The optimization is particularly effective for: - Projects with deep node_modules structures - pnpm workspaces (heavy symlink usage) - Parallel resolution of multiple packages All existing tests pass with no behavior changes.
1c9f519 to
ff6e393
Compare
Broke in #834
Moves path.canonicalized.get_or_init() from canonicalize_impl() into the recursive canonicalize_with_visited() function. This enables caching of parent directory canonicalization results, which are then reused when canonicalizing sibling paths.
Performance impact (measured with many example on monitor-oxc):
The optimization is particularly effective for:
All existing tests pass with no behavior changes.