TypeScript: Resolving modules and Intellisense Autocompletion pretty slow
From @ChiefORZ on May 30, 2017 11:28
- VSCode Version: Code 1.12.2 (19222cdc84ce72202478ba1cec5cb557b71163de, 2017-05-10T13:20:36.315Z)
- OS Version: Windows_NT ia32 6.1.7601
- Extensions:
| Extension | Author | Version | 
|---|---|---|
| project-manager | alefragnani | 0.18.0 | 
| one-monokai | azemoh | 0.2.4 | 
| npm-intellisense | christian-kohler | 1.3.0 | 
| path-intellisense | christian-kohler | 1.4.2 | 
| erb | CraigMaslowski | 0.0.1 | 
| vscode-eslint | dbaeumer | 1.2.11 | 
| githistory | donjayamanne | 0.2.0 | 
| gitlens | eamodio | 3.5.1 | 
| EditorConfig | EditorConfig | 0.9.3 | 
| prettier-vscode | esbenp | 0.17.1 | 
| vscode-console-wrapper | fabiodam | 0.4.0 | 
| php-debug | felixfbecker | 1.10.0 | 
| sublime-babel-vscode | joshpeng | 0.2.5 | 
| atom-keybindings | ms-vscode | 2.0.1 | 
| sort-imports | peterjuras | 2.3.1 | 
| better-merge | pprice | 0.7.0 | 
| code-settings-sync | Shan | 2.8.1 | 
| gitflow | vector-of-bool | 1.1.0 | 
| vscode-react-native | vsmobile | 0.3.2 | 
| JavaScriptSnippets | xabikos | 1.4.0 | 
| ReactSnippets | xabikos | 1.3.0 | 
| Material-theme | zhuangtongfa | 2.8.1 | 
Resolving modules and Intellisense Autocompletion in our Project takes a long time…

Maybe this problem is a result of using absolute paths.
Here is our jsconfig.json of the project:
{
  "compilerOptions": {
    "target": "es6",
    "module": "es6",
    "baseUrl": "./",  // all paths are relative to the baseUrl
    "paths": {
      "~/*" : ["*"]   // resolve any `~/foo/bar` to `<baseUrl>/foo/bar`
    }
  },
  "exclude": [
    "api",
    "build",
    "node_modules",
    "public",
    "seeds",
    "sql_updates",
    "tests.build"
  ]
}
Can i somehow debug which directories VSCode is resolving to find my correct file. And is there maybe a way to cache this resolved pathy specific for this IDE on my Client… to make the IDE not search my Filesystem every time - or do you plan on make this in the future
Copied from original issue: Microsoft/vscode#27539
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 31 (16 by maintainers)
Commits related to this issue
- Adding test for #16329 to verify the caching of file system when opening file — committed to microsoft/TypeScript by sheetalkamat 7 years ago
- Adding test for #16329 to verify the caching of file system when opening file — committed to microsoft/TypeScript by sheetalkamat 7 years ago
This should be fixed now. Can you please give a try to typescript@next
Thank you, it works like a charm!
Just in case, here is the procedure to upgrade VSCode typescript version: https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions
@nishp1 thank you for the log. I was able to find the behavior you mentioned. I know the reason for the behavior.
QuickInfo is just information from already created project but file open can open different project than what you have currently open (eg. look at how our compiler sources are. Server project does include files from compiler directory, but if you open file from that directory its project is going to be compiler project which results in different project creation)
I don’t know what was reasoning behind opening new project if that’s more relevant to the file open, but that’s what causes the delay because we lookup for the directories and try to find the config file. These calls are calling into the file system and the results aren’t cached.
So there are multiple ways this can be improved and I will look into it.
Just checking in, any update w/ this?