Rust bundled runtime installation spends avoidable CPU time decompressing gzip archives
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- build-system, performance
Hướng nghiên cứu
Bắt đầu từ API công khai github_copilot_sdk::install_bundled_runtime() và trình cài đặt bundled runtime được mô tả trong issue. Đo các trường hợp cold, warm và repair tương ứng bằng cách sử dụng các định danh runtime và archive được ghim, bao gồm digest, mode, bộ nhớ, CPU và kích thước release binary. Hoàn tất có nghĩa là quá trình xác minh warm hợp lệ không đọc bất kỳ byte nào từ archive, đồng thời vẫn duy trì tính toàn vẹn, quyền, hành vi sửa chữa, mức sử dụng bộ nhớ có giới hạn và các bảo đảm về tính đồng thời.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Status: architecture first
Following the maintainer's recommendation in #2678, address the architectural installation cost first without adding a decompression backend. #2676 is the owning implementation PR for single-pass streaming and trusted build-generated per-file hashes/metadata that allow valid warm verification without decompressing the archive. Retain the existing miniz_oxide backend and preserve content integrity, permissions, repair behavior, bounded memory, and concurrency guarantees.
The backend experiment in #2678 is now a draft and is deferred. Reconsider zlib-rs only after the architectural work lands and fresh matched cold/warm/repair benchmarks plus release binary-size measurements demonstrate a worthwhile remaining benefit. Earlier measurements against the eager installer are historical evidence, not post-architecture results.
Problem
At upstream revision 9553d5224c73df2d02aee5ec01eeb8353acc736a, the Rust bundled runtime installer traverses the same embedded gzip archive repeatedly and reconstructs large entries even during warm verification. Installer-only measurements show avoidable decompression and allocation costs.
Reproduction
Build the Rust SDK in release mode with its default bundled-cli feature and the pinned shipped runtime. In a fresh process with an isolated HOME, time the public github_copilot_sdk::install_bundled_runtime() API. Repeat with a fresh process against the same valid installation. Do not launch a CLI process, authenticate, or make a model request. Compare cold installation, valid warm verification, same-size corrupted runtime.node, and runtime.node truncated to 1024 bytes.
Evidence required
Use matched source/compiler/profile/runtime/archive identities and repeated alternating before/after processes. Compare output digests, sizes and modes; report latency, CPU, peak and retained memory, and release binary size. Prove valid warm verification reads no archive bytes while still checking installed content against trusted build-generated metadata rather than mutable cache markers.
Deferred backend tradeoff
flate2 documents the byte-slice adapter and backend options at https://docs.rs/flate2/1.1.9/flate2/. zlib-rs requires no C compiler but adds unsafe dependency internals. Any future backend proposal must justify that tradeoff with evidence on the completed architecture, not the old repeated-traversal implementation.
- Ngôn ngữ chính
- Java
- Star
- 10.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 130
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 github/copilot-sdk
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2759 ·
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/copilot-sdk#2709 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
github/copilot-sdk#2673 ·
Tất cả issue của github/copilot-sdk
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100