PowerShell / PowerShell/PowerShellEditorServices

Consider caching Alias & Command information

Đang mở
#992 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Area-CodeLens Area-Extension Terminal Issue-Enhancement Issue-Performance
Ngôn ngữ chính
C#
Star
767
Fork
266
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong src/PowerShellEditorServices/Language/LanguageService.cs, tại phần tra cứu được liên kết quanh dòng 327, sau đó xem xét hành vi của Integrated Console được mô tả trong #980, bao gồm trình xử lý ENTER của PSRL và trình xử lý của F8. Xác định cách thông tin về alias và command được lưu vào bộ nhớ đệm và bị vô hiệu hóa khi PSIC ở trạng thái dirty; hoàn thành có nghĩa là các yêu cầu references và codeLens chỉ sử dụng pipeline khi bộ nhớ đệm cần được làm mới.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, powershell
Lĩnh vực
performance
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.