Skip to content

Help snippet can be slow with large files having 100+ functions #771

Closed
@CJHarmath

Description

@CJHarmath

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions