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

IntelliSense is painfully slow #5063

Open
rigtigeEmil opened this issue Dec 17, 2024 · 6 comments
Open

IntelliSense is painfully slow #5063

rigtigeEmil opened this issue Dec 17, 2024 · 6 comments

Comments

@rigtigeEmil
Copy link

Vue - Official extension or vue-tsc version

v2.1.10

VSCode version

1.96

Vue version

3.5.13

TypeScript version

5.7.2

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 35.22 GB / 63.91 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

package.json dependencies

No response

Steps to reproduce

Intellisense is slow both in template and in script parts of Vue files. I've had a look at the output, and it seems a bunch of the requests are taking a long (multiple seconds) time.

The only thing I'm doing in this test is writing <div, expecting the tag to be closed automatically, and waiting. I see similar results, of requests taking a long time when editing the script part, or anything else essentially.

[Trace - 6:58:22 PM] Sending request 'textDocument/linkedEditingRange - (375)'.
[Trace - 6:58:22 PM] Received response 'textDocument/documentSymbol - (369)' in 2104ms.
[Trace - 6:58:22 PM] Received response 'textDocument/semanticTokens/range - (370)' in 1998ms.
[Trace - 6:58:22 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:22 PM] Received response 'textDocument/inlayHint - (371)' in 1876ms.
[Trace - 6:58:22 PM] Received response 'textDocument/inlayHint - (372)' in 1702ms.
[Trace - 6:58:22 PM] Received response 'textDocument/documentLink - (373)' in 1430ms.
[Trace - 6:58:22 PM] Received response 'textDocument/documentColor - (374)' in 1314ms.
[Trace - 6:58:22 PM] Received response 'textDocument/linkedEditingRange - (375)' in 63ms.
[Trace - 6:58:22 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:22 PM] Sending request 'textDocument/linkedEditingRange - (376)'.
[Trace - 6:58:23 PM] Received response 'textDocument/linkedEditingRange - (376)' in 2ms.
[Trace - 6:58:24 PM] Sending request 'textDocument/linkedEditingRange - (377)'.
[Trace - 6:58:24 PM] Received response 'textDocument/linkedEditingRange - (377)' in 1ms.
[Trace - 6:58:25 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:25 PM] Sending request 'textDocument/completion - (378)'.
[Trace - 6:58:25 PM] Received request 'workspace/configuration - (35)'.
[Trace - 6:58:25 PM] Sending response 'workspace/configuration - (35)'. Processing request took 0ms
[Trace - 6:58:25 PM] Received request 'workspace/configuration - (36)'.
[Trace - 6:58:25 PM] Sending response 'workspace/configuration - (36)'. Processing request took 0ms
[Trace - 6:58:25 PM] Sending request 'textDocument/linkedEditingRange - (379)'.
[Trace - 6:58:25 PM] Sending request 'textDocument/signatureHelp - (380)'.
[Trace - 6:58:25 PM] Sending request 'textDocument/foldingRange - (381)'.
[Trace - 6:58:25 PM] Sending request 'textDocument/documentSymbol - (382)'.
[Trace - 6:58:25 PM] Sending request 'textDocument/semanticTokens/range - (383)'.
[Trace - 6:58:26 PM] Sending request 'textDocument/inlayHint - (384)'.
[Trace - 6:58:26 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:26 PM] Sending request 'textDocument/inlayHint - (385)'.
[Trace - 6:58:26 PM] Sending request 'textDocument/documentColor - (386)'.
[Trace - 6:58:26 PM] Sending request 'textDocument/documentLink - (387)'.
[Trace - 6:58:26 PM] Received response 'textDocument/completion - (378)' in 1332ms.
[Trace - 6:58:26 PM] Received response 'textDocument/linkedEditingRange - (379)' in 1301ms.
[Trace - 6:58:26 PM] Received response 'textDocument/signatureHelp - (380)' in 1226ms.
[Trace - 6:58:26 PM] Received response 'textDocument/foldingRange - (381)' in 1151ms.
[Trace - 6:58:26 PM] Received response 'textDocument/documentSymbol - (382)' in 988ms.
[Trace - 6:58:26 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:26 PM] Sending request 'completionItem/resolve - (388)'.
[Trace - 6:58:27 PM] Received response 'textDocument/semanticTokens/range - (383)' in 1427ms.
[Trace - 6:58:27 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:27 PM] Received response 'textDocument/inlayHint - (384)' in 1306ms.
[Trace - 6:58:27 PM] Received response 'textDocument/inlayHint - (385)' in 1133ms.
[Trace - 6:58:27 PM] Received response 'textDocument/documentColor - (386)' in 894ms.
[Trace - 6:58:27 PM] Received response 'textDocument/documentLink - (387)' in 794ms.
[Trace - 6:58:27 PM] Received response 'completionItem/resolve - (388)' in 581ms.
[Trace - 6:58:27 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:27 PM] Sending request 'completionItem/resolve - (389)'.
[Trace - 6:58:27 PM] Received response 'completionItem/resolve - (389)' in 1ms.
[Trace - 6:58:27 PM] Sending request 'textDocument/signatureHelp - (390)'.
[Trace - 6:58:27 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:27 PM] Sending request 'completionItem/resolve - (391)'.
[Trace - 6:58:27 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:27 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:27 PM] Sending request 'completionItem/resolve - (392)'.
[Trace - 6:58:27 PM] Received response 'textDocument/signatureHelp - (390)' in 201ms.
[Trace - 6:58:27 PM] Received response 'completionItem/resolve - (391)' in 148ms.
[Trace - 6:58:27 PM] Received response 'completionItem/resolve - (392)' in 36ms.
[Trace - 6:58:27 PM] Sending request 'textDocument/signatureHelp - (393)'.
[Trace - 6:58:27 PM] Received response 'textDocument/signatureHelp - (393)' in 2ms.
[Trace - 6:58:28 PM] Sending request 'textDocument/linkedEditingRange - (394)'.
[Trace - 6:58:28 PM] Received response 'textDocument/linkedEditingRange - (394)' in 2ms.
[Trace - 6:58:28 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:28 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:28 PM] Sending request 'textDocument/completion - (395)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/documentSymbol - (396)'.
[Trace - 6:58:28 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:28 PM] Sending request 'volar/client/autoInsert - (397)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/signatureHelp - (398)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/linkedEditingRange - (399)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/documentSymbol - (400)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/documentColor - (401)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/foldingRange - (402)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/semanticTokens/range - (403)'.
[Trace - 6:58:28 PM] Sending request 'textDocument/inlayHint - (404)'.
[Trace - 6:58:28 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:28 PM] Sending request 'textDocument/inlayHint - (405)'.
[Trace - 6:58:29 PM] Sending request 'textDocument/documentLink - (406)'.
[Trace - 6:58:30 PM] Received response 'textDocument/completion - (395)' in 1863ms.
[Trace - 6:58:30 PM] Received response 'textDocument/documentSymbol - (396)' in 1841ms.
[Trace - 6:58:30 PM] Received response 'volar/client/autoInsert - (397)' in 1763ms.
[Trace - 6:58:30 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:58:30 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:30 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:30 PM] Received response 'textDocument/signatureHelp - (398)' in 1750ms.
[Trace - 6:58:30 PM] Received response 'textDocument/linkedEditingRange - (399)' in 1669ms.
[Trace - 6:58:30 PM] Received response 'textDocument/documentSymbol - (400)' in 1520ms.
[Trace - 6:58:30 PM] Received response 'textDocument/documentColor - (401)' in 1489ms.
[Trace - 6:58:30 PM] Received response 'textDocument/foldingRange - (402)' in 1480ms.
[Trace - 6:58:30 PM] Received response 'textDocument/semanticTokens/range - (403)' in 1376ms.
[Trace - 6:58:30 PM] Received response 'textDocument/inlayHint - (404)' in 1251ms.
[Trace - 6:58:30 PM] Sending request 'volar/client/autoInsert - (407)'.
[Trace - 6:58:30 PM] Sending request 'textDocument/signatureHelp - (408)'.
[Trace - 6:58:30 PM] Received response 'textDocument/inlayHint - (405)' in 1226ms.
[Trace - 6:58:30 PM] Received response 'textDocument/documentLink - (406)' in 932ms.
[Trace - 6:58:30 PM] Received response 'volar/client/autoInsert - (407)' in 59ms.
[Trace - 6:58:30 PM] Received response 'textDocument/signatureHelp - (408)' in 49ms.
[Trace - 6:58:30 PM] Sending request 'textDocument/linkedEditingRange - (409)'.
[Trace - 6:58:30 PM] Received response 'textDocument/linkedEditingRange - (409)' in 2ms.
[Trace - 6:58:30 PM] Sending request 'textDocument/documentSymbol - (410)'.
[Trace - 6:58:30 PM] Received response 'textDocument/documentSymbol - (410)' in 4ms.
[Trace - 6:58:30 PM] Sending request 'textDocument/foldingRange - (411)'.
[Trace - 6:58:30 PM] Received response 'textDocument/foldingRange - (411)' in 3ms.
[Trace - 6:58:30 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:30 PM] Sending request 'textDocument/semanticTokens/range - (412)'.
[Trace - 6:58:30 PM] Sending request 'textDocument/inlayHint - (413)'.
[Trace - 6:58:30 PM] Sending notification '$/cancelRequest'.
[Trace - 6:58:30 PM] Sending request 'textDocument/inlayHint - (414)'.
[Trace - 6:58:31 PM] Sending request 'textDocument/documentColor - (415)'.
[Trace - 6:58:31 PM] Sending request 'textDocument/documentLink - (416)'.
[Trace - 6:58:32 PM] Received response 'textDocument/semanticTokens/range - (412)' in 1672ms.
[Trace - 6:58:32 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:58:32 PM] Received response 'textDocument/inlayHint - (413)' in 1545ms.
[Trace - 6:58:32 PM] Received response 'textDocument/inlayHint - (414)' in 1373ms.
[Trace - 6:58:32 PM] Received response 'textDocument/documentColor - (415)' in 1167ms.
[Trace - 6:58:32 PM] Received response 'textDocument/documentLink - (416)' in 1090ms.
[Trace - 6:58:32 PM] Received notification 'textDocument/publishDiagnostics'.

What is expected?

Intellisense is completing within a reasonable time (100ms?), both when editing template and script

What is actually happening?

Intellisense is extremely slow, often taking 10s of seconds before completions are available

Link to minimal reproduction

No response

Any additional comments?

No response

@KazariEX
Copy link
Collaborator

Is it a new project without any dependencies?

@rigtigeEmil
Copy link
Author

Is it a new project without any dependencies?

Ah sorry, I thought I included my packages. No, it's not fresh. It's a Nuxt project:

  "dependencies": {
    "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@695224f",
    "@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@0ec16dd",
    "@nuxtjs/i18n": "^9.1.1",
    "@pinia/nuxt": "^0.9.0",
    "nuxt": "^3.14.1592",
    "pinia": "^2.3.0",
    "vue": "latest",
    "vue-router": "4.5.0",
    "zod": "^3.24.1"
  },
  "devDependencies": {
    "@hey-api/client-fetch": "^0.5.2",
    "@hey-api/openapi-ts": "^0.59.1",
    "@iconify-json/lucide": "^1.2.18",
    "@nuxt/eslint": "^0.7.3",
    "@nuxt/test-utils": "^3.15.1",
    "@vue/test-utils": "^2.4.6",
    "eslint": "^9.16.0",
    "happy-dom": "^15.11.7",
    "playwright-core": "^1.49.1",
    "ts-to-zod": "^3.15.0",
    "typescript": "^5.6.3",
    "vitest": "^2.1.6"
  },

@KazariEX
Copy link
Collaborator

Could you install a VSCode extension called Volar Labs to check the memory usage?

  • Turn off Hybrid Mode
  • Open a .vue file
  • Click Vue / TS Memory Treemap in the extensions tab

@rigtigeEmil
Copy link
Author

It spits out an HTML file, is there an easy way to share that?
Looks like this:
image

@KazariEX
Copy link
Collaborator

How much memory did it use in total?

image

@rigtigeEmil
Copy link
Author

200MB:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants