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

[typescript] code folding take too long to be initialised #51225

Closed
aeschli opened this issue Jun 6, 2018 · 3 comments
Closed

[typescript] code folding take too long to be initialised #51225

aeschli opened this issue Jun 6, 2018 · 3 comments
Assignees
Labels
javascript JavaScript support issues *out-of-scope Posted issue is not in scope of VS Code typescript Typescript support issues

Comments

@aeschli
Copy link
Contributor

aeschli commented Jun 6, 2018

  • open a file from the vscode repo
  • it takes a long time for the folding marker for imports to show up
  • it seems the folding provider is only added once the typescript server is up and has analyzed the project (my guess).

As folding ranges only require looking at single file and doesn't involve resolving code, it would be great if folding range requests are handled without delay.

@aeschli aeschli changed the title [typescript] code fdolig take too long to be initialized [typescript] code folding take too long to be initialised Jun 6, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Jun 7, 2018

This is a consequence of the tsserver being single threaded. Even if we queue up the "get folding ranges" request right away, requests are only processed once tsserver has initialized and analyzed the project

However, it should only really take a very long time (~15sec) on vs code size projects. If it is taking long on normal projects, it's likely because the project is including unnecessary files by not having the correct include or exclude sets in the jsconfig or tsconfig

@mjbvz mjbvz added typescript Typescript support issues javascript JavaScript support issues labels Jun 7, 2018
@aeschli
Copy link
Contributor Author

aeschli commented Jun 7, 2018

I understand. What we would need is that the tsserver yields from time to time while initializing.

I've improved the behaviour on the editor side. If we open an editor right on restart and see that the last time we used a folding provider (e.g. from typescript) we wait up to 30 seconds for it to be registered again. That way we don't loose the previously collapsed regions.

@mjbvz mjbvz added the *out-of-scope Posted issue is not in scope of VS Code label Sep 18, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 18, 2018

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this as completed Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript JavaScript support issues *out-of-scope Posted issue is not in scope of VS Code typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants