Skip to content

Typing an import makes TS unresponsive for > 30s #20815

Closed

Description

Type the following, one character at a time (i.e. no copy-paste tricks)

import * as viewEvents from 'vs/editor/common/view/viewEvents';

Observe how errors show up and the entire language service is unresponsive for >30s.

Saw it on Linux, but I don't think it is an OS specific issue

This is highly annoying and blocks me from being productive while selfhosting.

fyi Johannes Rieken (@jrieken)

Activity

  1. added
    bug
    info-needed
    typescript
    on Feb 17, 2017
  2. mjbvz commented on Feb 17, 2017

    @mjbvz
    Contributor

    To investigate this, try collecting some logs from the TypeScript server when this occurs. Here's information on to do this using the TSS_LOG environment variable: https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29#logging

    From a command prompt, run:

    $ export TSS_LOG="-level verbose -file /Users/USERNAME/.tslog"
    $ code 
    

    Reproduce the problem in VSCode and then share the .tslog file.

    Let me know if you have any questions about this.

    Thanks

  3. jrieken commented on Feb 20, 2017

    @jrieken
    Contributor

    I'd say this is the same as #18792. Matt Bierner (@mjbvz) Are you saying you don't see that?

  4. alexdima commented on Feb 20, 2017

    @alexdima
    MemberAuthor

    Matt Bierner (@mjbvz) Here you go:
    tslog.txt.tar.gz

    Here is also a gif of me typing the import. The gif is not a loop, it eventually comes back ~50s later:
    ts-server-slow

    Please let me know if you encounter further difficulties in reproducing.

  5. alexdima commented on Feb 20, 2017

    @alexdima
    MemberAuthor

    This is the TS version appearing in the status bar:

    image

    And here is the time it takes for tsserver to become responsive when pasting the import (~3s):

    ts-server-paste

  6. alexdima commented on Feb 20, 2017

    @alexdima
    MemberAuthor

    Notice how fast VS Code 1.8.1 is compared to the current insiders (~3s vs >50s):

    ts-server-1 8 1

  7. sandy081 commented on Feb 21, 2017

    @sandy081
    Member

    I also saw this slowness today. Intellisense and Diagnostics are very slow. I had to reload to get back to normal state

  8. mjbvz commented on Feb 21, 2017

    @mjbvz
    Contributor

    Mohamed Hegazy (@mhegazy) Can you please take a look here? I don't see anything explicitly going wrong on the VSCode side, but the request queue lengths do quickly build up which I believe causes this behavior.

    The reason the queues get so long may be getCodeFixes which starts out taking only a few ms but ends up taking 3.5 seconds plus in requests later on. I don't see any obvious causes in the TSS_LOGS for this

  9. mjbvz commented on Feb 21, 2017

    @mjbvz
    Contributor

    Thanks everyone. Vladimir Matveev (@vladima) took in a fix on the TS side microsoft/TypeScript#14215 and I also checked in a workaround on our side 02006fe and c94be6c

  10. alexdima commented on Feb 22, 2017

    @alexdima
    MemberAuthor

    Matt Bierner (@mjbvz) Vladimir Matveev (@vladima) Thanks a lot for the fix, tried it out in today's insiders. I really appreciate it 💯 🚀

  11. locked and limited conversation to collaborators on Nov 18, 2017
  12. added a commit that references this issue on Sep 6, 2026
    99dcb7f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginfo-neededtypescriptverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions