Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Consider caching Alias & Command information

Open
#992 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start in src/PowerShellEditorServices/Language/LanguageService.cs around the linked lookup at line 327, then review the Integrated Console behavior described in #980, including PSRL's ENTER handler and F8's handler. Define how alias and command information becomes cached and invalidated when the PSIC is dirty; done means references and codeLens requests use the pipeline only when the cache needs refreshing.

Written by the indexing model from the issue text.

Description

Area-CodeLens Area-Extension Terminal Issue-Enhancement Issue-Performance

On every textDocument/references request and every textDocument/codeLens request, we rely on the pipeline to get the current available.

This is time consuming and bottlenecked by the pipeline thread. As such, we should consider caching this result based on the state of the Integrated Console.

Coming off the the back of #980, one of the patterns I liked was the ability to tell if something was run in the PSIC using PSRL’s ENTER handler and F8’s handler.

Bringing this concept in, we can use it as a “Dirty” check where we cache aliases and command info results, and only refresh the cache when the PSIC is Dirty.

That way, for example, our textDocument/references request and textDocument/codeLens request only rely on the pipeline once the cache is Dirty and an otherwise run unblocked giving us a perf improvement.

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

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.

More from PowerShell/PowerShellEditorServices

All issues in PowerShell/PowerShellEditorServices

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.