PowerShell / PowerShell/PowerShellEditorServices
Consider caching Alias & Command information
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 767
- Forks
- 266
- Merge médio
- 3d 16h
- PRs com merge (30d)
- 1
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece em src/PowerShellEditorServices/Language/LanguageService.cs, ao redor da busca vinculada na linha 327, e depois revise o comportamento do Integrated Console descrito em #980, incluindo o handler de ENTER do PSRL e o handler do F8. Defina como as informações de alias e de comandos são armazenadas em cache e invalidadas quando o PSIC está dirty; considera-se concluído quando as referências e as solicitações de codeLens usam o pipeline somente quando o cache precisa ser atualizado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp, powershell
- Domínio
- performance
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100