Skip to content

fix: set module resolution cache#242

Merged
johnsoncodehk merged 1 commit intomasterfrom
fix/perf-cache
Oct 25, 2024
Merged

fix: set module resolution cache#242
johnsoncodehk merged 1 commit intomasterfrom
fix/perf-cache

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.

@pkg-pr-new
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

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