Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set module resolution cache #242

Merged
merged 1 commit into from
Oct 25, 2024
Merged

fix: set module resolution cache #242

merged 1 commit into from
Oct 25, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Oct 25, 2024

In TS 5.6, this method is called on the host to try to get the cache, unfortunately since we were not setting it, on every single keystroke TS would reload every single package json in the project, causing completions to take 200+ms to load every time.

TS 5.5:
image

Before (TS 5.6):
image

After (TS 5.6):
image

I'll note that this is still slower than TS 5.5, there's probably more things that should be cached that aren't, not sure.

Copy link

pkg-pr-new bot commented Oct 25, 2024

Open in Stackblitz

@volar/eslint

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/eslint@242

@volar/kit

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/kit@242

@volar/jsdelivr

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/jsdelivr@242

@volar/language-core

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-core@242

@volar/language-service

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-service@242

@volar/language-server

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-server@242

@volar/monaco

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/monaco@242

@volar/source-map

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/source-map@242

@volar/test-utils

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@242

@volar/typescript

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/typescript@242

@volar/vscode

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/vscode@242

commit: 4124743

@johnsoncodehk johnsoncodehk merged commit 0555ec4 into master Oct 25, 2024
9 checks passed
@johnsoncodehk johnsoncodehk deleted the fix/perf-cache branch October 25, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants