A cached vp run spends seconds compiling the same cache globs while building the task graph
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 58/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- performance
研究方向
Start in crates/vt_graph/src/config/mod.rs at resolve_glob_to_workspace_relative, where each input and output pattern is parsed, and compare repeated pattern uses with distinct patterns. The issue measures time spent building the task graph after configs load; use the reported cached vp run @libs/enum#test case to assess the improvement. Done means the same patterns are parsed once and the cached run spends less CPU building the graph.
由索引模型根據 Issue 內容生成。
描述
Written by an AI agent (Claude) on behalf of @jasonkuhrt.
In a workspace of 138 packages and 1,576 tasks, vp run @libs/enum#test with both of its tasks cached spends about 2 s of CPU after the configs load and before the first task starts, building the task graph.
Cause. resolve_glob_to_workspace_relative calls wax::Glob::new for every input and output pattern of every task. In wax 0.7, Glob::new compiles a regular expression and partition compiles another, and only the partition's prefix and text are kept. The workspace has 13,708 pattern uses but only 1,011 distinct patterns: packages repeat the same src/** and the same negations.
Measured (Vite+ 1.4.0 built against vite-task a3c087a7, optimized binding, macOS, 3 interleaved runs per variant, load average about 7):
| before | parse each distinct pattern once | |
|---|---|---|
| whole run, CPU | 4.45 s | 2.47 s |
| whole run, wall | 3.75 s | 1.79 s |
| after configs load, CPU | 2.06 s | 0.10 s |
A second, separate idea. Configs load one package after another (lib.rs). A prototype that let up to 8 loads overlap, keeping results in order, returned the same 138 configs as the serial load and took the same run from 2.47 s to 2.19 s CPU (1.79 s to 1.62 s wall) on top of the glob change. A config whose result depends on load order would be the risk, so it is left out of the fix.
- 主要語言
- Rust
- 星號
- 480
- 分支
- 50
- 平均合併
- 1 天 3 小時
- 30 天內合併 PR
- 62
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/vite-task 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 45/100
voidzero-dev/vite-task#888 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
voidzero-dev/vite-task#884 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 72/100
voidzero-dev/vite-task#881 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#879 ·
維護者通常 1 天內回覆
-
vp run hangs after a failure when a cancelled task's detached descendant holds its IPC connection未關閉
難度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#878 ·
維護者通常 1 天內回覆
查看 voidzero-dev/vite-task 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆
-
C-bug needs-triage O-UEFI T-libs
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug priority: P3 ready-for-agent
難度 2/5 1-3 小時 新手友好度 82/100
shep-pm/shep-kelpie#1332 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
ramensoftware/windhawk#1156 · 2 則留言 ·
-
area/cli complexity:trivial good first issue Stellar Wave test
難度 2/5 1-3 小時 新手友好度 68/100
Externalize-Labs/externalize#23 ·
維護者通常 1 天內回覆