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

Resolving modules and Intellisense Autocompletion pretty slow #27539

Closed
ChiefORZ opened this issue May 30, 2017 · 8 comments
Closed

Resolving modules and Intellisense Autocompletion pretty slow #27539

ChiefORZ opened this issue May 30, 2017 · 8 comments
Assignees
Labels
javascript JavaScript support issues perf typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@ChiefORZ
Copy link

  • VSCode Version: Code 1.12.2 (19222cd, 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...

bq7zrobog0

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

@ChiefORZ
Copy link
Author

Maybe it is, because our Project has about 550 Files in 120 Folders?

(excluding all folders mentioned above)

@nishp1
Copy link

nishp1 commented May 31, 2017

We have a similar problem as well. We have ~900 folders with ~3900 files.

Here is the tsconfig.json we are using:

{
    "compilerOptions": {
        "allowJs": true,
        "baseUrl": "./src",
        "jsx": "react",
        "module": "commonjs",
        "noImplicitAny": true,
        "outDir": "./dist/",
        "sourceMap": true,
        "strictNullChecks": true,
        "target": "es5"
    },
    "include": [
        "src/**/*.js",
        "src/**/*.jsx",
        "src/**/*.ts",
        "src/**/*.tsx",
        "typings/*.d.ts"
    ],
    "exclude": [
        "node_modules"
    ]
}

I often see "Loading..." while module path is being resolved. Even when path is resolved (displayed as tooltip/quickinfo), cmd + click takes a good 2 to 10 seconds to open the file. Happy to share more info if I know how to debug this.

@mjbvz mjbvz added javascript JavaScript support issues info-needed Issue requires more information from poster perf typescript Typescript support issues labels Jun 1, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 1, 2017

To investigate what is causing this slowdown, please try collecting the typescript server log:

  1. Set "typescript.tsserver.log": "verbose"
  2. Restart VSCode with the --disable-extensions command line flag to disable all extensions.
  3. Reproduce the issue
  4. Run the Open TSServer log File command and view the tsserver.log file

Each request to the tsserver should have timing information. Look for the quickInfo requests and responses towards the end of the logs. If you can share the log file I can take a look through them 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

@ChiefORZ
Copy link
Author

ChiefORZ commented Jun 2, 2017

Thanks for the response!

Made the server log executing only the issued problem. The quickInfo request does really need 11 seconds to execute...

here is my logfile. thanks for taking time for it :)

tsserver.zip

@nishp1
Copy link

nishp1 commented Jun 2, 2017

Thanks @mjbvz. Attached are verbose logs for Today's insider version (f977399). Grepping for "elapsed", I see logs ranging from 1ms to 18s.

tsserver.log.zip

Let me know if there is anything else I can do to provide more info.

@thorn0
Copy link

thorn0 commented Jun 4, 2017

I'm getting a similar effect with only 2 files in the project, one of which is a module that exports a big array, and the second file imports this module. At first after Code starts everything is fine, but then autocompletion becomes increasingly slow. This project and the logs can be found here. Might be a good isolated illustration of the issue.

vscode: 1.13.0-insider f977399
ts 2.3.4

@nishp1
Copy link

nishp1 commented Jun 5, 2017

I was trying to debug typescript server over the weekend but oss version didn't load builtin extensions nor let me install chrome debugger to debug typescript server. Is there an argument I need to pass in to enable extensions in dev?

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 7, 2017

This issue was moved to microsoft/TypeScript#16329

@mjbvz mjbvz closed this as completed Jun 7, 2017
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed info-needed Issue requires more information from poster labels Jun 7, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues perf typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants