PowerShell / PowerShell/PowerShellEditorServices
Consider caching Alias & Command information
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 767
- Forks
- 266
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in src/PowerShellEditorServices/Language/LanguageService.cs bei der verknüpften Suche in Zeile 327 und prüfe anschließend das in #980 beschriebene Verhalten der Integrated Console, einschließlich des ENTER-Handlers von PSRL und des Handlers von F8. Lege fest, wie Alias- und Befehlsinformationen zwischengespeichert und ungültig gemacht werden, wenn PSIC dirty ist; abgeschlossen ist die Arbeit, wenn Referenzen und codeLens-Anfragen die Pipeline nur verwenden, wenn der Cache aktualisiert werden muss.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, powershell
- Bereich
- performance
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100