Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

IntelliSense performance problems tsserver blocking #339

Closed

Description

@JohnnyDevNull

Original from: #336 (comment)

Description:

I recognize performance problems from jump to source or displaying library informations on hovering types and displaying inline docs with pressed CTRL and hovering. While here the debug output from the plugin looks smooth there is invisible blocking time between the Search Path step and the Config file name

My setup:

  • Big project with a lot of modules per lazy loading
  • Some libraries like DevExtreme, ng-bootstrap, lodash, moment, etc
  • Our own internal angular library
  • Angular Version 7.2.15
  • Angular Language Service Plugin 0.800.0

Reproduction:

  1. define something like this:
  public gridEditingOptions: DevExpress.ui.dxDataGridOptions['editing'] = {
    mode: 'batch',
    allowUpdating: true,
    allowAdding: true,
    allowDeleting: true,
    startEditAction: 'dblClick',
    selectTextOnEditStart: true,
    useIcons: true
  };
  1. hovering the type goes mostly fast:
    image

  2. now move away hover it again and press and hold CTRL:
    image

Some times it works fast when only hovering, but mostly especially with pressed CTRL it takes some time, but the debug console looks clean.

  1. hover, press CTRL and click to jump to source or press F12: same as 3. sometimes with long blocking time.

  2. With disabled language service it opens up instantly every time, no slow down, memory and cpu load not mentionable

Possible reasone:

After trying to find out where this comes i can only say that i can push the ram and cpu consumption up with a hovering and moveaway loop

  1. No file open and waited some time so that vscode calmed down:

image

  1. after hovering i think 20 times... with each step the loading takes a bit longer...

image

I think the problem is that the duplicate tsserver here blocks each other or the main blocks the angular one or vice versa, but here i can make only assumptions.

Activity

  1. JohnnyDevNull commented on Jun 4, 2019

    @JohnnyDevNull
    Author

    Maybe this is fixed with #338 ?

  2. andrius-pra commented on Aug 1, 2019

    @andrius-pra
    Contributor

    I had a similar issue and I solved it with changes from this daf0cea commit:

    • Share the same DocumentRegistry instance DocumentRegistry between all language services.
    • Disabled Angular language service for InferredProjects (projects without tsconfig config file)
    • Retain the configured project even I close last opened file from the project. This prevents do not create or remove project on every time I open or close a file.

    @JohnnyDevNull, can you try to compile and test extension from this branch.

  3. gayanper commented on Aug 9, 2019

    @gayanper

    @andrius-pra when i try to build your branch i get the following error

    $ yarn run compile                                                                                               
    yarn run v1.17.3                                                                                                 
    $ node $(yarn bin)/installServerIntoExtension ../client ./package.json ./tsconfig-build.json && cp yarn.lock ../c
    lient/server && tsc -p tsconfig-build.json                                                                       
    internal/modules/cjs/loader.js:583                                                                               
        throw err;                                                                                                   
        ^                                                                                                            
    
  4. andrius-pra commented on Aug 9, 2019

    @andrius-pra
    Contributor

    @gayanper Compiled and uploaded here.
    Disable official extension while testing this build.

  5. gayanper commented on Aug 9, 2019

    @gayanper

    @andrius-pra You improvement solved my issue. When can we expect these changes to end up in the master ?

  6. andrius-pra commented on Aug 9, 2019

    @andrius-pra
    Contributor

    Great! I will split my changes into smaller PR in coming days and @kyliau will decide if it worth to merge to master.

  7. angular-automatic-lock-bot commented on Feb 16, 2020

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions