TS server significantly slower to initialize when includePackageJsonAutoImports
is auto
#60854
Labels
Needs More Info
The issue still hasn't been fully clarified
🔎 Search Terms
includePackageJsonAutoImports
paths
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
My large work project became significantly slower to initialize in VS Code after we migrated from
paths
intsconfig.json
toexports
inpackage.json
(6s before, 12s after).I dug into the TS server log and noticed
AutoImportProvider
was now including many more files than before (2474 before, 8442 after).This led me to
typescript.preferences.includePackageJsonAutoImports
, which I understand defaults toauto
. When I set it tooff
, initialization time decreases from 12s back down to 6s. Note this doesn't seem to affect the functionality of auto imports.I can't imagine this would be expected behaviour: 6s of extra initialization with no noticeable gain in functionality.
Unfortunately I can't share a reduced test case for this, but I would be happy to do further debugging if someone could give me guidance.
For context, this project is a monorepo with multiple packages depending on each other. We are also utilizing project references (each package has its own project). The package
exports
includes many entries.🙁 Actual behavior
N/A
🙂 Expected behavior
N/A
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: