Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CJHarmath opened this issue May 19, 2017 · 3 comments
Closed

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

CJHarmath opened this issue May 19, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@CJHarmath
Copy link

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.

@daviwil
Copy link
Contributor

daviwil commented May 19, 2017

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

/cc @kapilmb

@daviwil daviwil added Area-Snippets Issue-Bug A bug to squash. labels May 19, 2017
@daviwil daviwil added this to the May 2017 milestone May 19, 2017
@kapilmb
Copy link

kapilmb commented May 19, 2017

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

@daviwil
Copy link
Contributor

daviwil commented May 24, 2017

Fixed with PR PowerShell/PowerShellEditorServices#459.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants