Avatar for the oxc-project user
oxc-project
oxc-resolver
BlogDocsChangelog

Performance History

Latest Results

chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
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
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%
2 days ago
3086ae0
perf/skip-utf8-resolve
Β© 2026 CodSpeed Technology
Home Terms Privacy Docs