Skip to content

Auto-completion fails due to performance issues #2522

Closed
PowerShell/PowerShellEditorServices
#1238

Description

@rkeithhill

System Details

System Details Output

### VSCode version: 1.42.1 c47d83b293181d9be64f27ff093689e8e7aed054 x64

### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version:

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

Auto-complete was working for about 5 minutes into editing a small script (220 lines) but now it has wedged.

Expected Behaviour

Auto-complete should not ever stop working - in an ideal world. :-)

Actual Behaviour

I get the dreaded "Loading..." message for at least a minute before I give up:

VSCodePSAutoCompleteWedge.zip
1583432852-d0e516fc-13f8-444b-877f-cecf115455871583432271941.zip

Attached Logs

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

1583432852-d0e516fc-13f8-444b-877f-cecf115455871583432271941.zip

Activity

  1. ghost added
    Needs: Triage
    on Mar 5, 2020
  2. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    Does Ctrl+C help?

  3. rkeithhill commented on Mar 5, 2020

    @rkeithhill
    ContributorAuthor

    In the integrated terminal? For some reason, the integrated terminal is not appearing in my list of terminals.

  4. rkeithhill commented on Mar 5, 2020

    @rkeithhill
    ContributorAuthor

    Also, seems my PS Session is still using RC.3 even though I upgraded to the GA release.

  5. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    It's probably defaulting to preview. Try switching to PowerShell (x64)

  6. rkeithhill commented on Mar 5, 2020

    @rkeithhill
    ContributorAuthor

    OK, now on PS 7 GA and have PSIC displaying. I had done some experimenting with settings a while back and apparently set showOnStartup to false. Fixed.

  7. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    Are you running anything in the time before the completions fail?

  8. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    I'm getting sluggish completions, but haven't been able to repro this yet

  9. rkeithhill commented on Mar 5, 2020

    @rkeithhill
    ContributorAuthor

    No, not running anything. I can do a develop reload window and try auto-completion and initially, it works OK but gets slower. Some context, these couple of PS scripts are in a project that houses an Electron app with several Angular lib projects. That's six node_modules directories and 295,000 files.

  10. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    That's six node_modules directories and 295,000 files.

    Wow. Hmm yeah I suspect this is related to that. I think there might be a simple fix here that we've been overlooking for a while, where we need to filter out bad files...

    I'm thinking of #1256 (comment)

  11. rjmholt commented on Mar 5, 2020

    @rjmholt
    Contributor

    That just encourages me to get back to work on PSScriptAnalyzer...

  12. added
    Issue-Performance
    and removed
    Needs: Triage
    on Mar 5, 2020
  13. mrboring commented on Mar 8, 2020

    @mrboring

    No, not running anything. I can do a develop reload window and try auto-completion and initially, it works OK but gets slower. Some context, these couple of PS scripts are in a project that houses an Electron app with several Angular lib projects. That's six node_modules directories and 295,000 files.

    I'm also getting a slow down on auto-complete. Even with a project containing only a few files.

  14. 37 remaining items

  15. ghost added
    Needs: Maintainer Attention
    on Apr 5, 2020
  16. TylerLeonhardt commented on Apr 7, 2020

    @TylerLeonhardt
    Member

    I have a PR out to improve performance even more: PowerShell/PowerShellEditorServices#1251

    If you would like to give it a go, I'd love the feedback.

    Download this zip:
    psvsix.zip

    Extract it and run:

    code --install-extension ./path/to/PowerShell-insiders.vsix
    

    Make sure the regular PowerShell (stable) extension is disabled.

    Restart VS Code.

    To verify you've done it correctly, your version number in the extension pane for PowerShell Preview should be: 2020.4.0-CI.49654.

    NOTE: This is an unsigned build and isn't supported. If you can only run signed things, don't bother trying this.

  17. mrboring commented on Apr 8, 2020

    @mrboring

    TylerLeonhardt I've spend about 90 minutes typing functions (for testing I just duplicated existing functions into a dummy project) and auto-complete has worked perfectly so far. Good performance, with no crashes.

  18. ghost added
    Needs: Maintainer Attention
    on Apr 8, 2020
  19. TylerLeonhardt commented on Apr 8, 2020

    @TylerLeonhardt
    Member

    Nice! At the very least it is an improvement. I'll try to push a PowerShell Preview release today or tomorrow with a Stable release next week.

  20. removed
    Needs: Maintainer Attention
    on Apr 8, 2020
  21. stevenebutler commented on Apr 8, 2020

    @stevenebutler

    I was too busy with urgent work yesterday to try this out, but I've installed it this morning and will see how it goes. Ironically if it works it would have saved me plenty of time with restarts yesterday and today I don't have the same need to do any mad scripting (yet).

  22. ghost added
    Needs: Maintainer Attention
    on Apr 8, 2020
  23. stevenebutler commented on Apr 8, 2020

    @stevenebutler

    This version is significantly better than before and have not needed to restart in the last 60+ minutes, which was unheard of with the current preview. I've been reworking the script I did yesterday which it would freeze on pretty regularly so things have definitely improved.

  24. TylerLeonhardt commented on Apr 8, 2020

    @TylerLeonhardt
    Member

    Awesome - this will be live in......... about 10 or so minutes as the PowerShell Preview extension and then if it goes well, Stable will follow next week.

  25. TylerLeonhardt commented on Apr 8, 2020

    @TylerLeonhardt
    Member

    I will close this as we close issues when the fix is merged in and this has been merged in.

  26. removed
    Needs: Maintainer Attention
    on Apr 8, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions