Vscode-powershell: Help snippet can be slow with large files having 100+ functions

Created on 19 May 2017  路  3Comments  路  Source: PowerShell/vscode-powershell

System Details

  • Operating system name and version: Windows 7 Enterprise
  • VS Code version: VS Code Insiders 1.13.0-insider
  • PowerShell extension version: 1.1.0
  • Output from $PSVersionTable:
    Name Value
    ---- -----
    PSVersion 5.1.14409.1005
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.14409.1005
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
$pseditor.EditorServicesVersion


Major  Minor  Build  Revision
-----  -----  -----  --------
1      1      0      0

Issue Description

I am experiencing a performance problem with the help snippet on a largish ps1 file with 6000+ lines and 100+ functions. It can take up to 10s for the snippet to generate the help

Below is a demonstration with approx 10s delay.

vscode_helpsnippet

I am not experiencing the same with small files.
Yeah, I get that I should break this script up, but that's another story

CPU: core i5-6600 @ 3.3GHz - 4 cores
Powershell.exe CPU goes to 25%, maxing out one core, while waiting so it seems to be very busy working out what to print.

Area-Snippets Issue-Bug

Most helpful comment

I know why this is happening. We will get this fixed next release.

All 3 comments

Yikes! Thanks a lot for the report, we'll take a look.

/cc @kapilmb

I know why this is happening. We will get this fixed next release.

Was this page helpful?
0 / 5 - 0 ratings