PowerShell / PowerShell/vscode-powershell

PowerShell process CPU spikes, terminates

Open
#1,134 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Performance
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

System Details
  • Operating system name and version: Windows 7 Enterprise SP1
  • VS Code version: 1.19.1
  • PowerShell extension version: 1.5.1
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

-> code -v
1.19.1
0759f77bb8d86658bc935a10a64f6182c5a1eeba
x64
-> $pseditor.EditorServicesVersion

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


-> code --list-extensions --show-versions
bibhasdn.unique-lines@1.0.0
DotJoshJohnson.xml@1.9.2
Ionide.Ionide-fsharp@3.15.4
jsynowiec.vscode-insertdatestring@2.2.0
justusadam.language-haskell@2.4.0
ms-vscode.csharp@1.13.1
ms-vscode.PowerShell@1.5.1
sensourceinc.vscode-sql-beautify@0.0.4
UCL.haskelly@0.4.29
Issue Description

My powershell.exe process routinely shoots up to at least 25% CPU when I attempt to send a statement to the integrated console, and the statement takes 10-15 seconds to execute - but only after several minutes of inactivity in the editor. Subsequent immediate attempts execute immediately unless I let several more minutes go by.

Looking at the logs now, it seems like the PowerShell process keeps shutting down. Is that normal?

Attached Logs

logs.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached logs.zip and reproducing the delay after several minutes of editor inactivity on Windows 7 with the listed VS Code and PowerShell extension versions. Trace why powershell.exe shuts down or restarts when a statement is sent to the integrated console. Done means the cause is identified and the console no longer incurs the reported delay or CPU spike.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.