oxc-project
oxc-resolver
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
chore: release v11.20.1
release-plz-2026-05-28T15-25-06Z
24 minutes ago
perf: reduce resolution syscalls by unifying stat and lstat (#1182) ## Summary Module resolution looked at each path twice: a `stat` (`metadata`, follows symlinks) for `is_file`/`is_dir` during resolution, then an `lstat` (`symlink_metadata`) on the same path again during canonicalization. Most paths aren't symlinks, so the two passes were redundant β for `npm-flat`, 49 lstats found only **2** actual symlinks, and ~37 of those paths had already been `stat`'d. This unifies them so `is_file`/`is_dir` are **lstat-first**. ## What changed - `CachedMeta` now holds two 1-byte slots β `link` (the cached `lstat` view) and `followed` (the cached `stat` view). - `is_file`/`is_dir` read the cached `lstat`; for the common non-symlink case that *is* the answer (no `stat`), and only a genuine symlink triggers a follow-up `stat`. - Canonicalization reuses the same cached `lstat` instead of issuing its own. - `FileSystemOs::symlink_metadata` is now VPath-aware for Yarn PnP. Previously only `metadata()` translated virtual/zip paths, so lstat-backed `is_file`/`is_dir` would have failed under PnP. Net per path: `savings = |statβ©lstat| β symlinks-followed`. ## Results β 18β28% fewer syscalls Measured on the 16-request package-manager workload (same one the `package_managers` bench uses): | layout | before | after | |---|---|---| | npm-flat / yarn-flat / bun-flat | 126 | **91** | | pnpm-isolated / hoisted / bun-isolated | 149 | **122** | | yarn-isolated | 142 | **115** | | yarn-pnp | 144 | **106** | `stat` calls collapse from ~40β51 down to 0β8 (only the genuine symlink-follows). Behavior of `is_file`/`is_dir` is unchanged β they still return symlink-followed results. π€ Generated with [Claude Code](https://claude.com/claude-code)
main
27 minutes ago
perf: reduce resolution syscalls by unifying stat and lstat (#1182) ## Summary Module resolution looked at each path twice: a `stat` (`metadata`, follows symlinks) for `is_file`/`is_dir` during resolution, then an `lstat` (`symlink_metadata`) on the same path again during canonicalization. Most paths aren't symlinks, so the two passes were redundant β for `npm-flat`, 49 lstats found only **2** actual symlinks, and ~37 of those paths had already been `stat`'d. This unifies them so `is_file`/`is_dir` are **lstat-first**. ## What changed - `CachedMeta` now holds two 1-byte slots β `link` (the cached `lstat` view) and `followed` (the cached `stat` view). - `is_file`/`is_dir` read the cached `lstat`; for the common non-symlink case that *is* the answer (no `stat`), and only a genuine symlink triggers a follow-up `stat`. - Canonicalization reuses the same cached `lstat` instead of issuing its own. - `FileSystemOs::symlink_metadata` is now VPath-aware for Yarn PnP. Previously only `metadata()` translated virtual/zip paths, so lstat-backed `is_file`/`is_dir` would have failed under PnP. Net per path: `savings = |statβ©lstat| β symlinks-followed`. ## Results β 18β28% fewer syscalls Measured on the 16-request package-manager workload (same one the `package_managers` bench uses): | layout | before | after | |---|---|---| | npm-flat / yarn-flat / bun-flat | 126 | **91** | | pnpm-isolated / hoisted / bun-isolated | 149 | **122** | | yarn-isolated | 142 | **115** | | yarn-pnp | 144 | **106** | `stat` calls collapse from ~40β51 down to 0β8 (only the genuine symlink-follows). Behavior of `is_file`/`is_dir` is unchanged β they still return symlink-followed results. π€ Generated with [Claude Code](https://claude.com/claude-code)
perf/lstat-first-metadata
29 minutes ago
perf: reduce resolution syscalls by unifying stat and lstat Resolution used to stat() a path for is_file/is_dir (following symlinks) and then lstat() the same path again during canonicalization. Most paths are not symlinks, so the two passes were redundant: for npm-flat, 49 lstats found only 2 actual symlinks, and ~37 of those paths had already been stat'd. Make is_file/is_dir lstat-first: consult a cached lstat (symlink_metadata) and only issue a follow-up stat for actual symlinks, and have canonicalize reuse the same cached lstat. CachedMeta now holds two 1-byte slots, the lstat (link) view and the stat (followed) view. Also make FileSystemOs::symlink_metadata VPath-aware for Yarn PnP; previously only metadata() translated virtual/zip paths, so lstat-backed is_file/is_dir would have failed for PnP. Cuts total syscalls 18-28% on the 16-request package-manager workload (npm-flat 126->91, pnpm-isolated 149->122, yarn-pnp 144->106).
perf/lstat-first-metadata
51 minutes ago
perf: reduce resolution syscalls by unifying stat and lstat Resolution used to stat() a path for is_file/is_dir (following symlinks) and then lstat() the same path again during canonicalization. Most paths are not symlinks, so the two passes were redundant: for npm-flat, 49 lstats found only 2 actual symlinks, and ~37 of those paths had already been stat'd. Make is_file/is_dir lstat-first: consult a cached lstat (symlink_metadata) and only issue a follow-up stat for actual symlinks, and have canonicalize reuse the same cached lstat. CachedMeta now holds two 1-byte slots, the lstat (link) view and the stat (followed) view. Also make FileSystemOs::symlink_metadata VPath-aware for Yarn PnP; previously only metadata() translated virtual/zip paths, so lstat-backed is_file/is_dir would have failed for PnP. Cuts total syscalls 18-28% on the 16-request package-manager workload (npm-flat 126->91, pnpm-isolated 149->122, yarn-pnp 144->106).
perf/lstat-first-metadata
1 hour ago
chore: release v11.20.1
release-plz-2026-05-28T15-25-06Z
2 hours ago
fix: make symlink_metadata VPath-aware for Yarn PnP (#1183) ## Summary `FileSystemOs::metadata` already translates Yarn PnP **virtual** and **zip** paths through `VPath` before hitting the filesystem, but `symlink_metadata` did not β it `lstat`'d the raw path directly: ```rust fn symlink_metadata(&self, path: &Path) -> io::Result<FileMetadata> { Self::symlink_metadata(path) // no VPath translation } ``` For a virtual/zip path that has no physical existence, that `lstat` fails, so canonicalization (`canonicalize_with_visited`) sees the error, treats the path as a non-symlink, and cannot resolve symlinks correctly under PnP. This makes `symlink_metadata` mirror `metadata`'s `VPath` handling. Zip entries are never symlinks, so they reuse the same `file_type` lookup as `metadata`; virtual/native paths fall through to the real `lstat` on the translated physical path. This is also a prerequisite for #1182, which routes `is_file`/`is_dir` through the cached `lstat` and so requires `symlink_metadata` to be VPath-aware. ## Verification - `cargo test --all-features` (includes the Yarn PnP suite) β green - `fixtures/pnp` JS resolver test β green π€ Generated with [Claude Code](https://claude.com/claude-code)
main
2 hours ago
fix: make symlink_metadata VPath-aware for Yarn PnP (#1183) ## Summary `FileSystemOs::metadata` already translates Yarn PnP **virtual** and **zip** paths through `VPath` before hitting the filesystem, but `symlink_metadata` did not β it `lstat`'d the raw path directly: ```rust fn symlink_metadata(&self, path: &Path) -> io::Result<FileMetadata> { Self::symlink_metadata(path) // no VPath translation } ``` For a virtual/zip path that has no physical existence, that `lstat` fails, so canonicalization (`canonicalize_with_visited`) sees the error, treats the path as a non-symlink, and cannot resolve symlinks correctly under PnP. This makes `symlink_metadata` mirror `metadata`'s `VPath` handling. Zip entries are never symlinks, so they reuse the same `file_type` lookup as `metadata`; virtual/native paths fall through to the real `lstat` on the translated physical path. This is also a prerequisite for #1182, which routes `is_file`/`is_dir` through the cached `lstat` and so requires `symlink_metadata` to be VPath-aware. ## Verification - `cargo test --all-features` (includes the Yarn PnP suite) β green - `fixtures/pnp` JS resolver test β green π€ Generated with [Claude Code](https://claude.com/claude-code)
fix/symlink-metadata-vpath
2 hours ago
Latest Branches
CodSpeed Performance Gauge
-5%
chore: release v11.20.1
#1178
36 minutes ago
57d63ef
release-plz-2026-05-28T15-25-06Z
CodSpeed Performance Gauge
-5%
perf: reduce resolution syscalls by unifying stat and lstat
#1182
40 minutes ago
4e9ac5e
perf/lstat-first-metadata
CodSpeed Performance Gauge
+4%
fix: make symlink_metadata VPath-aware for Yarn PnP
#1183
2 hours ago
a539c40
fix/symlink-metadata-vpath
Β© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs