PowerShell / PowerShell/PowerShellEditorServices

Consider disabling module auto-loading during IntelliSense

Open
#438 8 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-IntelliSense Issue-Performance
Dominant language
C#
Stars
767
Forks
266
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Module auto-loading during IntelliSense is causing some issues for people, including session hangs and IntelliSense slowness. We use Get-Command to gather information about the currently active IntelliSense result. This causes the module containing the command to get loaded, and if the module misbehaves somehow, it can damage the rest of the session.

We should consider setting the $PSModuleAutoLoadingPreference to "none" before running Get-Command so that IntelliSense details are only gathered for modules that the user has loaded. To make sure we have cmdlet signature details, we could potentially just parse the tooltips of the completions if they're available without loading the module.

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 tracing the IntelliSense path that uses Get-Command to gather details for the active completion result. Determine how to prevent that lookup from loading modules while retaining available cmdlet signature details; done means IntelliSense no longer causes session hangs or slowness from module auto-loading.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.