oxc-project
oxc-resolver
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
12 hours ago
chore(deps): update napi (#1245) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [napi](https://crates.io/crates/napi) | dependencies | patch | `3.9.3` β `3.9.4` | | [napi-derive](https://crates.io/crates/napi-derive) | dependencies | patch | `3.5.6` β `3.5.7` | --- ### Configuration π **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) π¦ **Automerge**: Enabled. β» **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. π» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc-resolver). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzUuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
main
12 hours ago
chore(deps): update napi
renovate/napi
12 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
2 days ago
perf: avoid UTF-8 validation on alias and .d.ts resolve hot paths (#1244) ## Summary Follow-up to #1240. Three small changes that avoid paying for UTF-8 validation/conversion of `OsStr` paths on resolution hot paths, plus a comment cleanup. - **file-as-alias** (`src/lib.rs`): `load_browser_field_or_alias` already gates the lookup on the resolved path's raw bytes (`key_matches`) before doing any string work. When a key does match, borrow the path via `Path::to_str()` instead of `to_string_lossy()`. `to_str()` is a zero-allocation borrow and returns `None` for non-UTF-8 paths β which can't resolve through a string alias anyway, so skipping them is equivalent while avoiding the lossy allocation. - **.d.ts module type** (`src/dts_resolver.rs`): `dts_module_type` only checks ASCII extension suffixes (`.d.mts`, `.cts`, `.json`, β¦), so it now matches on `as_encoded_bytes()` directly and drops the UTF-8 validation scan. ASCII bytes never appear inside a multi-byte UTF-8/WTF-8 sequence, so this is byte-for-byte equivalent. - **comments**: trim the verbose comments that landed with the alias byte-gate in #1240. No observable behavior change and no public API change. π€ Generated with [Claude Code](https://claude.com/claude-code)
main
2 days ago
perf: avoid UTF-8 validation on alias and .d.ts resolve hot paths - file-as-alias (lib.rs): borrow the resolved path via `Path::to_str` instead of `to_string_lossy` after the existing byte-gate; avoids the lossy allocation for non-UTF-8 paths, which cannot resolve through a string alias anyway. - .d.ts module type (dts_resolver.rs): match the ASCII extension suffixes on the raw `OsStr` bytes, dropping the UTF-8 validation scan. - trim the verbose comments introduced with the alias byte-gate (#1240).
perf/skip-utf8-resolve
2 days ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
2 days ago
perf(alias): skip UTF-8 validation of resolved path when no alias key matches (#1240) ## Problem `load_browser_field_or_alias` runs `cached_path.path().to_string_lossy()` on **every probed file candidate**, to try the user `alias` list against the resolved path (enhanced-resolve applies aliases to resolved paths too). On a valid-UTF-8 path the returned `Cow` is borrowed (no allocation), but it still **validates UTF-8 over the whole path** each time β wasted work on a hot path, since alias keys are bare specifiers that essentially never match an absolute file path. A warm `sample` profile of `resolver_memory/single-thread` attributed ~11% of self-time to `Utf8Chunks::next` / `from_utf8_lossy` driven by this single line. ## Change - Add `CompiledAliasEntry::key_matches(&[u8])` β the exact per-entry test `load_alias` uses to decide whether to try an alias, evaluated on raw bytes. - `load_alias` now uses it (single source of truth; removes the duplicated inline match block). - Gate the `to_string_lossy()` behind `self.alias.iter().any(|a| a.key_matches(path_bytes))` over `as_os_str().as_encoded_bytes()`. When no key matches the path bytes (the common case) the validation is skipped; when one does, behavior is identical. Behavior-preserving: `key_matches` mirrors `load_alias`'s own condition, so the gate only skips work where `load_alias` would have returned `None`. Byte-only and `as_encoded_bytes()` is already used elsewhere in the crate, so it stays cross-platform. ## Result `resolver_memory/single-thread`: **28.76 β 27.04 Β΅s (β6.2%, p=0.00)**, stable on a warm-to-warm re-run. Re-profiling confirms `Utf8Chunks` / `from_utf8_lossy` drop out of the profile and `load_alias` self-time falls 1804 β 381 samples.
main
2 days ago
Latest Branches
CodSpeed Performance Gauge
+7%
chore: release v11.22.0
#1228
12 hours ago
fa94c35
release-plz-2026-06-18T23-48-37Z
CodSpeed Performance Gauge
-2%
chore(deps): update napi
#1245
12 hours ago
fb3a927
renovate/napi
CodSpeed Performance Gauge
+4%
perf: avoid UTF-8 validation on alias and .d.ts resolve hot paths
#1244
2 days ago
3086ae0
perf/skip-utf8-resolve
Β© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs