Skip to content

Typescript process is consuming much memory and preventing suggestions at editorΒ #58820

Closed as not planned
@devhik0

Description

@devhik0

πŸ”Ž Search Terms

  • slow
  • memory usage
  • typescript intellisense is working so slow at vscode

πŸ•— Version & Regression Information

  • This is a crash
  • This changed between versions 5.4 and 5.5

⏯ Playground Link

No response

πŸ’» Code

// Your code here

πŸ™ Actual behavior

When i make a mistake in my code, my ram usage is increasing much and intellisense is not showing errors/warnings in expected time period like 1-2 sec. Sometimes its hanging and i am waiting for minutes to see its response.
Not sure but i think that error below is causing that performance issues.

ERR <semantic> TypeScript Server Error (5.5.0-dev.20240603)
BADCLIENT: Bad error code, 7006 not found in range 399..403 (found: ); could have caused this error:
Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isParameter'.
Error: BADCLIENT: Bad error code, 7006 not found in range 399..403 (found: ); could have caused this error:
Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isParameter'.
    at cast (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:3478:16)
    at doChange33 (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159733:23)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159617:21
    at _ChangeTracker.with (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:174292:5)
    at Object.getCodeActions (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159616:62)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:151199:46
    at flatMap (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:2634:17)
    at Object.getFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:151199:10)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:149479:33
    at flatMap (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:2634:17)
    at Object.getCodeFixesAtPosition (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:149477:12)
    at IOSession.getCodeFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191171:50)
    at getCodeFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:189255:43)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191478:69
    at IOSession.executeWithRequestId (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191470:14)
    at IOSession.executeCommand (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191478:29)
    at IOSession.onMessage (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191520:51)
    at Interface.<anonymous> (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:499:14)
    at Interface.emit (node:events:514:28)
    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)
    at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:610:22)
    at Socket.ondata (node:internal/readline/interface:243:23)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:545:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
    at Readable.push (node:internal/streams/readable:375:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23): Error: <semantic> TypeScript Server Error (5.5.0-dev.20240603)
BADCLIENT: Bad error code, 7006 not found in range 399..403 (found: ); could have caused this error:
Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isParameter'.
Error: BADCLIENT: Bad error code, 7006 not found in range 399..403 (found: ); could have caused this error:
Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isParameter'.
    at cast (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:3478:16)
    at doChange33 (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159733:23)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159617:21
    at _ChangeTracker.with (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:174292:5)
    at Object.getCodeActions (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:159616:62)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:151199:46
    at flatMap (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:2634:17)
    at Object.getFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:151199:10)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:149479:33
    at flatMap (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:2634:17)
    at Object.getCodeFixesAtPosition (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:149477:12)
    at IOSession.getCodeFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191171:50)
    at getCodeFixes (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:189255:43)
    at c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191478:69
    at IOSession.executeWithRequestId (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191470:14)
    at IOSession.executeCommand (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191478:29)
    at IOSession.onMessage (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\typescript.js:191520:51)
    at Interface.<anonymous> (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:499:14)
    at Interface.emit (node:events:514:28)
    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)
    at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:610:22)
    at Socket.ondata (node:internal/readline/interface:243:23)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:545:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
    at Readable.push (node:internal/streams/readable:375:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
	at n.create (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:473136)
	at v.dispatchResponse (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:467106)
	at v.dispatchMessage (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:465950)
	at n.value (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:465443)
	at s.B (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:737)
	at s.fire (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:954)
	at y.onLengthData (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:476865)
	at Socket.<anonymous> (c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:476512)
	at Socket.emit (node:events:514:28)
	at addChunk (node:internal/streams/readable:376:12)
	at readableAddChunk (node:internal/streams/readable:349:9)
	at Readable.push (node:internal/streams/readable:286:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

πŸ™‚ Expected behavior

At mistakes, seeing errors/warnings in short period.

Additional information about the issue

When i check logs and traces i am seeing a lot different packages are downloading while the error-checking continues. Like this:

{"pid":1,"tid":1,"ph":"X","cat":"check","ts":1003639605.0000191,"name":"checkExpression","dur":467.7000045776367,"args":{"kind":80,"pos":432,"end":438,"path":"c:/users/aydin/web/app/crm-saas/client-app/node_modules/@radix-ui/react-primitive/dist/index.d.mts"}},
{"pid":1,"tid":1,"ph":"X","cat":"check","ts":1003639364.4000292,"name":"checkExpression","dur":2160.399913787842,"args":{"kind":80,"pos":201,"end":211,"path":"c:/users/aydin/web/app/crm-saas/client-app/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts"}},
{"pid":1,"tid":1,"ph":"X","cat":"check","ts":1003639358.899951,"name":"checkExpression","dur":2578.8999795913696,"args":{"kind":166,"pos":201,"end":215,"path":"c:/users/aydin/web/app/crm-saas/client-app/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts"}},
{"pid":1,"tid":1,"ph":"I","cat":"session","ts":1004819072.8000402,"name":"cancellationThrown","s":"g","args":{"kind":"CancellationTokenObject"}},
{"pid":1,"tid":1,"ph":"X","cat":"check","ts":1003631394.6999311,"name":"checkExpression","dur":1187831.300020218,"args":{"kind":213,"pos":991,"end":2353,"path":"c:/users/aydin/web/app/crm-saas/client-app/components/ui/dialog.tsx"}},
{"pid":1,"tid":1,"ph":"X","cat":"check","ts":1003630949.3999481,"name":"checkExpression","dur":1188276.6000032425,"args":{"kind":80,"pos":563,"end":576,"path":"c:/users/aydin/web/app/crm-saas/client-app/app/calendar/add-event-form.tsx"}},

Trace-20240610T183642.json

Also at this process: C:\Program Files\nodejs\node.exe" --max-old-space-size=12000 "c:\Users\aydin\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\aydin\AppData\Local\Temp\vscode-typescript\465f576e122de7f00782\tscancellation-f24a4ea23cca8e2de700.tmp* --traceDirectory "\"c:\Users\aydin\AppData\Roaming\Code - Insiders\logs\20240610T180039\window1\exthost\vscode.typescript-language-features\tsserver-log-7zZxSQ\"" --locale en --noGetErrOnBackgroundUpdate --canUseWatchEvents --validateDefaultNpmLocation 504.904 K there is around 500mb memory usage, even i give 12GB to it.

I could say i cant code because of these kind of problems.

Metadata

Metadata

Assignees

Labels

Domain: PerformanceReports of unusually slow behaviorNeeds InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions