这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Nov 16, 2025

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.

@graphite-app
Copy link

graphite-app bot commented Nov 16, 2025

How to use the Graphite Merge Queue

Add 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
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.88%. Comparing base (e1ef00d) to head (ff6e393).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/cache/cache_impl.rs 60.00% 6 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Boshen Boshen force-pushed the optimize-canonicalization-caching branch from 36df5e0 to 1c9f519 Compare November 16, 2025 16:56
@Boshen Boshen marked this pull request as ready for review November 16, 2025 16:56
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 16, 2025

CodSpeed Performance Report

Merging #843 will not alter performance

Comparing optimize-canonicalization-caching (ff6e393) with main (4528a3f)1

Summary

✅ 11 untouched
⏩ 5 skipped2

Footnotes

  1. No successful run was found on main (ff6e393) during the generation of this report, so 4528a3f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen added the merge label Nov 17, 2025
Copy link
Member Author

Boshen commented Nov 17, 2025

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.
@graphite-app graphite-app bot force-pushed the optimize-canonicalization-caching branch from 1c9f519 to ff6e393 Compare November 17, 2025 04:09
@graphite-app graphite-app bot merged commit ff6e393 into main Nov 17, 2025
17 checks passed
@graphite-app graphite-app bot removed the merge label Nov 17, 2025
@graphite-app graphite-app bot deleted the optimize-canonicalization-caching branch November 17, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants