PowerShell / PowerShell/vscode-powershell
Extremelly slow module import in integrated console
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Modules are loaded very slow (20-50 times slower), particularly if made by bunch of ps1 files that are included in psm1. The integrated console starts very slow too, around the same time slower then when adding new terminal which starts way faster even with bunch of stuff in my profile.
The following gif shows a) native powershell loads moudle in 1s, integrated in 22s

This of course makes debugging virtually impossible, particularly if you have import-module xyz -force as you need to wait a long time for module to reimport on each F11. In my company everybody stopped debugging in vscode because of this.
This wasn't the case lets say a year from now, it started happening after some version and I hopped it was going to be intermittent quirk but its still there.
This was recorded on very good machine with 32 CPUs and 32GB Ram and fast SSD disc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files, tests, or entry points. First reproduce the timing difference between native PowerShell and the integrated console with a module composed of included ps1 files, then trace the integrated console's module-import and startup path. Done means module imports and console startup no longer show the reported severe slowdown, with a regression test if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100