Improve Performance of Intellisense further
See original GitHub issueThis is happening on both the stable and the preview version of the extension, using all latest release versions including VS Code as of today.
I have a redirected My Documents folder, so by default my PSModulePath includes a UNC path.
When I open a .ps1 file or start a new PowerShell file it opens the PowerShell Integrated Console (which starts very slowly, like upwards of a minute with high CPU use).
Then whenever I proceed to start typing commands in the console it flashes “Searching available modules” followed by the UNC path. It completes in about 1 second but it does this over and over and over. Basically every time I press a key on the keyboard and intellisense is trying to figure out what command I’m trying tor run, it flashes in the terminal.
During that 1 second where it’s searching for available modules the intellisese is locked and doesn’t display anything.
I completely uninstalled VS Code, all settings and extensions, etc. re-installed and it’s still happening. My VS Code PowerShell Profile is empty, and all settings are default.
Name Value
---- -----
PSVersion 5.1.17763.1007
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1007
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Windows 10 x64 Build 1809
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (1 by maintainers)
Top GitHub Comments
Sadly there is not, as the PowerShell pipeline is single-threaded, so that’s an architecture limitation beneath PSES.
If I understand this article correctly (“https://docs.microsoft.com/en-us/powershell/module/powershellget/install-module?view=powershell-5.1”), PowerShell modules get installed to $env:ProgramFiles\WindowsPowerShell\Modules except if you use the -Scope currentuser option which installs the modules to $home\Documents\WindowsPowerShell\Modules. In my case it is “$home” that causes the issue because I can’t change this variable and it points to a folder redirected to a UNC path. If MS would give us the option to specify a local path for the “currentuser” repository instead of assuming “$home”, then we could make sure it was a local folder and avoid the UNC issue.