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
3 hours 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
3 hours 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
3 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
3 hours 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
3 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
4 hours ago
chore(deps): update github actions to v7 (#1243) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://redirect.github.com/actions/checkout) | action | major | `v6.0.3` β `v7.0.0` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v7.0.0`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700) [Compare Source](https://redirect.github.com/actions/checkout/compare/v6.0.3...v7.0.0) - Block checking out fork PR for pull\_request\_target and workflow\_run by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2454](https://redirect.github.com/actions/checkout/pull/2454) - Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2458](https://redirect.github.com/actions/checkout/pull/2458) - Bump flatted from 3.3.1 to 3.4.2 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2460](https://redirect.github.com/actions/checkout/pull/2460) - Bump js-yaml from 4.1.0 to 4.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2461](https://redirect.github.com/actions/checkout/pull/2461) - Bump [@​actions/core](https://redirect.github.com/actions/core) and [@​actions/tool-cache](https://redirect.github.com/actions/tool-cache) and Remove uuid by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2459](https://redirect.github.com/actions/checkout/pull/2459) - upgrade module to esm and update dependencies by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2463](https://redirect.github.com/actions/checkout/pull/2463) - Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2462](https://redirect.github.com/actions/checkout/pull/2462) </details> --- ### Configuration π **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - Automerge - At any time (no schedule defined) π¦ **Automerge**: Disabled because a matching PR was automerged previously. β» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. π **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
main
4 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
23 hours ago
Latest Branches
CodSpeed Performance Gauge
+4%
chore: release v11.22.0
#1228
3 hours ago
717c4df
release-plz-2026-06-18T23-48-37Z
CodSpeed Performance Gauge
+4%
perf: avoid UTF-8 validation on alias and .d.ts resolve hot paths
#1244
3 hours ago
3086ae0
perf/skip-utf8-resolve
CodSpeed Performance Gauge
+6%
chore(deps): update rust crates
#1242
23 hours ago
111cbf0
renovate/rust-crates
Β© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs