Skip to content

Intellisense Extremely Slow #53541

Closed
Closed

Description

@bladnman
  • VSCode Version: 1.25.0-insider
  • OS Version: Windows 10 1709

Steps to Reproduce:

  1. Type Character
  2. CTRL-SPACE to auto-complete
  3. Go Eat lunch
  4. Continue work

Does this issue occur when all extensions are disabled?: Yes

I have seen many other issues here opened about this problem but they all seem to get closed in some way or another. I cannot be the only one experiencing the broken-ness of Intellisense.

I am working in a JavaScript project that is not small on a very strong machine. When I first launch VSC if I let the editor rest a bit (perhaps index reading, not sure) then Intellisense works very well. After a bit of work in the editor (sometimes immediately but often a few minutes of bliss) the dreaded loading... indicator is all I get. I can wait from anywhere between 30s and 90s and the window does eventually appear. It's worth saying this is not progressive -- meaning once it goes south it never takes less than 30s.

During this time there are not other large processes running to spike the CPU. This seems to really be within VSC itself.

It is also worth noting that there are times when if I let it complete it's loading cycle it starts working at normal speed again for a bit. This usually does not last long (2m) but it does happen.

I am willing to get the "intelli" part disabled if at least macros and auto-complete for local values worked. Any way to limit what it was trying to look through to present the feature.

Activity

  1. added
    javascript
    on Jul 4, 2018
  2. jacobweber commented on Jul 6, 2018

    @jacobweber

    Seeing this after updating from 1.24.1 to 1.25.0 on Mac. Downgrading to 1.24.1 fixes it.

  3. TungJerry commented on Jul 17, 2018

    @TungJerry

    I have same issue after updating to 1.25.0 on Mac.

  4. thaiihuy commented on Jul 18, 2018

    @thaiihuy

    I have same issue after updating to 1.25.0 on Window. Try to downgrade VSCode

  5. mjbvz commented on Jul 19, 2018

    @mjbvz
    Contributor

    Using VS Code insiders, please try collecting the TS Server log:

    1. Set "typescript.tsserver.log": "verbose",
    2. Restart VS Code and reproduce the problem
    3. In VS Code, run the TypeScript: Open TS Server log command
    4. This should open a folder with a tsserver.log file in it

    Look through that log file for errors or stack traces. If you can share the log, I can also take a look to see if anything stands out

    ⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

  6. added
    info-needed
    on Jul 19, 2018
  7. espenbjorkeng commented on Jul 25, 2018

    @espenbjorkeng

    Same behaviour here.

    Intellisense is fast immediately after restart, but after a while (30 minutes or so, maybe less) I always have to press CTRL + SPACE and wait a second or two before snippets and other suggestions appear.

    Windows 10
    Version: 1.25.1

  8. mitchelldemler commented on Jul 27, 2018

    @mitchelldemler

    Same here on Windows 10, v1.25.1. Co-workers experiencing the same thing.

    Possibly the same issue, but it also hangs when we press F12 (Go to definition) in our Typescript project. Takes anywhere up to 30s to find.

    I'm going to try downgrading to 1.24.1 until this is resolved as 1.25.1 is unusable at the moment.

    (For anyone else struggling to find the 1.24.1 Windows x64 download).

    From Logs:

    Info 856  [15:50:38.104] For info: c:/repos/xxxxxs/WebUi/src/areas/Conjunctionals/components/xxxxxOfficePicker.tsx :: Config file name: c:/repos/xxxxxs/WebUi/tsconfig.json
    Info 857  [15:50:38.105] Project 'c:/repos/xxxxxs/WebUi/tsconfig.json' (Configured) 0
    Info 857  [15:50:38.105] 	Files (661)
    	c:/repos/xxxxxs/WebUi/node_modules/typescript/lib/lib.es6.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/redux/index.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/DOMUtils.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/createBrowserHistory.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/createHashHistory.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/createMemoryHistory.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/LocationUtils.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/PathUtils.d.ts
    	c:/repos/xxxxxs/WebUi/node_modules/@types/history/index.d.ts
    
    600 files listed below...
    

    Not sure if relevant, but every time I open a file in the editor, the logs say that ~661 files are affected. I'm not sure if this is normal?

  9. luchsamapparat commented on Aug 10, 2018

    @luchsamapparat

    I can confirm this, however in my project it's 1171 files. And as far as I can see it's not just once per file … I opened my project workspace, opened one file and then CTRL+clicked on a class to navigate to another file. Here's the complete log file:
    tsserver.log

    The project I used is this one: https://github.com/luchsamapparat/cfha-client

    Another thing I've noticed: I have these performance issues in all my Angular projects, however another Node.js project is as fast as it can get. Also: All my colleagues experience the same performance issues (at least the Windows users). And disabling all extensions didn't help.

  10. joostme commented on Aug 13, 2018

    @joostme

    We are experiencing extremely slow intellisense in our projects (Angular projects).

    Steps to reproduce:

    1. Open a .ts file
    2. CTRL-Click on any reference inside the same project
    3. Wait for 20-30 seconds for VSCode to open the file the reference is located in

    This slows down our development immensely.

    Following lines always appear in the tsserver.log when doing a CTRL-Click on a reference:

    Info 0    [12:25:35.438] Starting TS Server
    Info 1    [12:25:35.439] Version: 3.1.0-dev
    Info 2    [12:25:35.440] Arguments: C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe C:\Users\Joost\AppData\Roaming\npm\node_modules\typescript\lib\tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\Joost\AppData\Local\Temp\vscode-typescript\tscancellation-db7b1b580ffa571e6fc0.tmp* --logVerbosity verbose --logFile C:\Users\Joost\AppData\Roaming\Code - Insiders\logs\20180813T122004\vscode.typescript-language-features_1\tsserver-log-dWDwm2\tsserver.log --locale de --noGetErrOnBackgroundUpdate
    Info 3    [12:25:35.440] Platform: win32 NodeVersion: 8 CaseSensitive: false
    Info 4    [12:25:35.447] Binding...
    
    ...
    
    Info 14   [12:25:35.557] request:
        {"seq":2,"type":"request","command":"open","arguments":{"file":"c:/Users/Joost/git/project/project-project/src/app/shared/entity/entity.selectors.ts","fileContent":"<FILE_CONTENT>","scriptKindName":"TS","projectRootPath":"c:\\Users\\Joost\\git\\project\\project-client"}}
    
    ...
    >>> Typescript looks for the tsconfig.json in parent directories
    ...
    
    Info 25   [12:25:35.564] For info: c:/Users/Joost/git/project/project-client/src/app/shared/entity/entity.selectors.ts :: Config file name: c:/Users/Joost/git/project/project-client/tsconfig.json
    Info 26   [12:25:36.168] Opened configuration file c:/Users/Joost/git/project/project-client/tsconfig.json
    Info 27   [12:25:36.175] FileWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/tsconfig.json 2000 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Config file for the program
    Info 28   [12:25:36.176] DirectoryWatcher:: Added:: WatchInfo: c:/users/joost/git/project/project-client 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Wild card directory
    Info 29   [12:25:36.176] c for path c:/users/joost/git/project/project-client not found in cache...
    Info 30   [12:25:36.178] Starting C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe with args:
        ["C:/Users/Joost/AppData/Roaming/npm/node_modules/typescript/lib/watchGuard.js","c:/users/joost/git/project/project-client"]
    Info 31   [12:25:36.454] WatchGuard for path c:/users/joost/git/project/project-client returned: OK
    Info 32   [12:25:36.454] Elapsed:: 278ms DirectoryWatcher:: Added:: WatchInfo: c:/users/joost/git/project/project-client 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Wild card directory
    
    ...
    >>> Typescript traverses all project .ts files e.g.
    Info 40   [12:25:36.462] FileWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/src/app/app.component.spec.ts 500 Project:  WatchType: Closed Script info
    ...
    
    Info 646  [12:25:37.174] Starting updateGraphWorker: Project: c:/Users/Joost/git/project/project-client/tsconfig.json
    Info 647  [12:25:37.446] FileWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules/protractor/built/index.d.ts 500 Project:  WatchType: Closed Script info
    Info 648  [12:25:37.454] DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    Info 649  [12:25:37.454] watchDirectory for c:/Users/Joost/git/project/project-client/node_modules uses cached drive information.
    Info 650  [12:25:37.454] Elapsed:: 0ms DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    
    ... 
    >>> Typescript traverses all node_modules d.ts files e.g.:
    Info 651  [12:25:37.494] FileWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules/protractor/built/browser.d.ts 500 Project:  WatchType: Closed Script info
    ...
    
    Info 2227 [12:25:48.146] DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/e2e 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    Info 2228 [12:25:48.146] watchDirectory for c:/Users/Joost/git/project/project-client/e2e uses cached drive information.
    Info 2229 [12:25:48.146] Elapsed:: 0ms DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/e2e 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    Info 2230 [12:25:48.660] DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/node_modules 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    Info 2231 [12:25:48.660] watchDirectory for c:/Users/Joost/git/project/node_modules uses cached drive information.
    Info 2232 [12:25:48.661] Elapsed:: 1ms DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/node_modules 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Directory of Failed lookup locations in module resolution
    Info 2233 [12:25:48.930] DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules/@types 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Type root directory
    Info 2234 [12:25:48.930] watchDirectory for c:/Users/Joost/git/project/project-client/node_modules/@types uses cached drive information.
    Info 2235 [12:25:48.931] Elapsed:: 1ms DirectoryWatcher:: Added:: WatchInfo: c:/Users/Joost/git/project/project-client/node_modules/@types 1 Project: c:/Users/Joost/git/project/project-client/tsconfig.json WatchType: Type root directory
    Info 2236 [12:25:48.931] Finishing updateGraphWorker: Project: c:/Users/Joost/git/project/project-client/tsconfig.json Version: 1 structureChanged: true Elapsed: 11757ms
    ...
    
    

    What I find irritating is that Typescript scans node_modules folder even though the reference I clicked is inside the project itself. So it should have stopped at line 646.

    Also notice the WatchType: Directory of Failed lookup locations in module resolution errors on line 648 and following.

    The whole process took over 10 seconds and that is after I freshly restarted VSCode.

    I am running on VSCode - Insiders build as well as typescript@next.

  11. luchsamapparat commented on Aug 21, 2018

    @luchsamapparat

    Is there anything else I can provide to investigate this issue? I see a lot of other Performance issues being closed due to inactivity/missing feedback from the original poster. However, I have this problem since at least the last 2 major releases and it is the same for a couple of colleagues of mine.

  12. mjbvz commented on Aug 22, 2018

    @mjbvz
    Contributor

    Marvin Luchs (@luchsamapparat) What TS version are you using? That log you uploaded is using TypeScript 2.7.2. Do you see this when using TypeScript 3.0.1?

  13. luchsamapparat commented on Aug 22, 2018

    @luchsamapparat

    Matt Bierner (@mjbvz) Here's an updated tsserver.log für TS 3.0.1. It does not feel significantly faster. It still takes way to long to even CTRL+Click on symbols defined in the same file.

    tsserver.log

    Thanks for looking into this

  14. mjbvz commented on Aug 22, 2018

    @mjbvz
    Contributor

    Joost Zöllner (@joostme) and Marvin Luchs (@luchsamapparat) can you both please open new issues against typescript with those server logs: https://github.com/Microsoft/TypeScript/issues/new?template=Bug_report.md

    From the logs, I see that initial project load takes ~20 second and don't think this caused by VS Code

  15. luchsamapparat commented on Aug 23, 2018

    @luchsamapparat

    Matt Bierner (@mjbvz) I am now more confused than ever. It appears, that there are several causes for the performance issues. In my initial post, I said that the problem also persists when deactivating all extensions. Now, with the latest VS Code as well as TypeScript version, the initial load time is indeed still slow. However, after that all further code navigation is severely slowed down by the Angular Language Service. When deactivating that extension, it's as fast as it has been months ago.

    I'll open a bug report against typescript regarding the initial load time, and one against the Angular Language Service regarding the other performance issues.

    Thanks for your assistance 👍

  16. mjbvz commented on Sep 5, 2018

    @mjbvz
    Contributor

    Matt Maher (@bladnman) Does what Marvin Luchs (@luchsamapparat) describe also cover your original issue?

  17. vscodebot commented on Sep 13, 2018

    @vscodebot

    This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

    Happy Coding!

  18. violettomsk commented on Sep 25, 2018

    @violettomsk

    disabling heavy extensions solves problem for me.

  19. nasreddineskandrani commented on Sep 27, 2018

    @nasreddineskandrani

    Marvin Luchs (@luchsamapparat)

    Now, with the latest VS Code as well as TypeScript version, the initial load time is indeed still slow.
    However, after that all further code navigation is severely slowed down by the Angular Language Service.
    When deactivating that extension, it's as fast as it has been months ago.`

    In an angular project context, for me too deactivation of the extension Angular Language Service resolve the issue.

    I'll open a bug report against typescript regarding the initial load time, and one against the Angular
    Language Service regarding the other performance issues.

    => Did you do it? i don't see any issue linked to this github issue. Can you reference it please? i may try to fix the extension my self.

    edit: i found this issue we can use it i guess angular/vscode-ng-language-service#44

  20. locked and limited conversation to collaborators on Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-neededjavascript

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions