Schema cache stores ~950KB in globalState, triggering VS Code's large-extension-state warning
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vscode
- Lĩnh vực
- devtools
Hướng nghiên cứu
Bắt đầu với ARCHITECTURE.md và theo dõi cầu nối kusto/getData và kusto/setData qua SchemaManager và globalState của VS Code. Xác định cách payload của schema được lưu bền vững qua các phiên, sau đó sử dụng globalStorageUri đồng thời giữ nguyên hành vi bộ nhớ đệm trong bộ nhớ và giữa các phiên. Được xem là hoàn tất khi dữ liệu globalState hiện có đã được di chuyển hoặc loại bỏ và cảnh báo về trạng thái mở rộng lớn không còn xuất hiện lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
VS Code logs this warning repeatedly during normal use:
[warning] [mainThreadStorage] large extension state detected
(extensionId: ms-kusto.kusto-explorer-vscode, global: true): 949.6767578125kb.
Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.
Roughly 950 KB is being held in globalState, and the warning repeats as the value is rewritten.
Where it comes from
The schema cache. Per ARCHITECTURE.md, schema is cached at two levels: in-memory in SchemaManager, plus VS Code storage across sessions via the kusto/getData / kusto/setData → globalState bridge, so startup is usable immediately while background reconciliation refreshes both copies.
The cross-session half of that design is what trips the warning. globalState is a key/value store intended for small values — VS Code keeps it in memory and serializes it — so a cached database schema is well outside what it is meant to hold. globalStorageUri is the documented place for payloads of this size.
Impact
Nothing is broken today, and the caching design itself is sound — this is about the storage medium, not the strategy. But it grows with the number of connected clusters and the size of their schemas, so a user with several large clusters will push it further. The observed ~950 KB came from ordinary use.
Reproduction
- Launch the Extension Development Host and connect to any cluster so schema is fetched.
- Watch the extension host log.
- The
mainThreadStoragewarning appears and recurs as schema is written back.
Notes
- Pre-existing and unrelated to any PR currently open. Observed on branches for #146 and #148 alike, and it comes from schema caching that predates both.
- Surfaced while testing those PRs in a live Extension Development Host, so filing it rather than losing the observation.
- A fix would move the persisted schema payload to
globalStorageUriwhile keeping the two-level cache behavior intact — including migrating or discarding whatever is already inglobalStateso the warning actually stops.
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 7
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/Kusto-Explorer-VsCode
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Remote-SSH: browser sign-in on every query; prefer VS Code authentication before native authĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
Results grid: show Count/Sum/Avg/Min/Max for selected numeric cells in a status barCó thể đã có người làm @AsafMah đã nhận 53 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/Kusto-Explorer-VsCode#143 · 1 bình luận ·
-
Add a setting to scope the query CodeLens to the active queryCó thể đã có người làm @AsafMah đã nhận 52 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
Log Analytics / Application Insights connections truncate the full proxy URI to the bare hostnameCó thể đã có người làm @AsafMah đã nhận 52 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/Kusto-Explorer-VsCode#139 · 1 bình luận · 1 reaction ·
Tất cả issue của microsoft/Kusto-Explorer-VsCode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/data-liberation-agent#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
README に GitHub の組織のバッジを足すĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
funmary-app/funmary#399 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:curator enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
CassioDalla/Scrinalia#150 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: needs-triage v1-bug-bash
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
a2ui-project/a2ui#3533 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend enhancement priority:P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
geolens-io/geolens#3310 ·
Maintainer thường phản hồi trong vòng 1 ngày