refactor(tsconfig): skip TsConfig deep clone for non-root configs#1265
Conversation
`get_tsconfig` deep-cloned every parsed `TsConfig` before branching, but only the root branch needs the clone (because `build()` consumes `self`). On the non-root path - taken once per `extends` entry - the original was dropped unused. Move the config into the cached `Arc` directly and clone only in the root branch.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1265 +/- ##
=======================================
Coverage 93.85% 93.85%
=======================================
Files 21 21
Lines 4313 4314 +1
=======================================
+ Hits 4048 4049 +1
Misses 265 265 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 3.57%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
## 🤖 New release * `oxc_resolver`: 11.22.0 -> 11.23.0 * `oxc_resolver_napi`: 11.22.0 -> 11.23.0 <details><summary><i><b>Changelog</b></i></summary><p> ## `oxc_resolver` <blockquote> ## [11.23.0](v11.22.0...v11.23.0) - 2026-07-02 ### <!-- 0 -->🚀 Features - *(tsconfig)* expose outDir, declarationDir, resolveJsonModule, checkJs ([#1257](#1257)) (by @Boshen) ### <!-- 1 -->🐛 Bug Fixes - *(exports)* propagate the last error in array target resolution ([#1267](#1267)) (by @Boshen) ### <!-- 2 -->🚜 Refactor - deduplicate cross-file helpers, drop stale lint allows ([#1269](#1269)) (by @Boshen) - *(dts)* deduplicate package entry selection and remove dead code ([#1266](#1266)) (by @Boshen) - *(tsconfig)* skip TsConfig deep clone for non-root configs ([#1265](#1265)) (by @Boshen) - *(alias)* compile fallback aliases once at construction ([#1264](#1264)) (by @Boshen) ### <!-- 4 -->⚡ Performance - *(alias)* scan a packed first-byte array instead of striding over alias entries ([#1260](#1260)) (by @Boshen) ### Contributors * @Boshen </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com>
Cache::get_tsconfigdeep-cloned every parsedTsConfigbefore branching onroot, but the clone only matters in the root branch, whereTsConfig::build(mut self)consumes the value after the raw version is cached. On the non-root path — taken once perextendsentry — the original local was dropped unused, so the clone (CompilerOptions, threeOption<Vec<PathBuf>>s, references, paths) was pure waste.The raw cache still stores the
should_build = falseversion and the built cache still stores the built version; returnedArcs share the cached instances exactly as before.Split out of #1263.