perf(install): pipeline per-project materialize into fetch phase#527
perf(install): pipeline per-project materialize into fetch phase#527jdx merged 5 commits intoendevco:mainfrom
Conversation
Greptile SummaryThis PR pipelines per-project (non-GVS) materialization into the fetch phase: each freshly-fetched package is materialized into
Confidence Score: 5/5Safe to merge; no currently-reachable incorrect behavior was found in the changed code paths. The new materializer correctly uses JoinSet for abort-on-drop semantics and the semaphore acquire is properly propagated as an error. The main concern — whether The Important Files Changed
Reviews (2): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
Changed
(canonical_key, PackageIndex)triggersmaterialize_intoagainst.aube/<dep_path>/so by the time fetch finishes the dedicated link phase only creates top-levelnode_modules/<name>symlinksaube-linker: new pubensure_in_aube_dirwrappingmaterialize_intowith idempotent entry-exists short-circuitaube-linker:mkdirpexposed pub for use by the install-side materializer driverFixed
Vec<JoinHandle>forJoinSetin materializer driver. on early-return the set drops all in-flight tasks instead of detaching them, no orphan disk writes racing install cleanupunwrapreplaced with proper miette error map. no panic across cross-crate boundary if the semaphore is closedmkdirp(parent)inensure_in_aube_dir.materialize_intoalready batchescreate_dir_allfor every parent it needs, the entry parent is justaube_dirwhich the driver pre-createsBenchmarks
Ran the PR benchmark matrix locally against both the base commit
df72dcbe9554e2e277ad85ba5135079d28bcbc54and PR head451b082d2c4818e41487abccc542e9c4e9348896with the same host, same benchmark settings, and same tool versions:cargo build --releasecompleted before each benchmark run. pnpm was installed through mise's npm backend becausemise x aqua:pnpm/pnpm@latestfailed on Linux before the benchmark started with a missingpnpm-linux-x64asset lookup.Versions:
PR head results
Same-host base comparison
Public ratios: warm installs vs Bun 2x -> 2x; warm installs vs pnpm 5x -> 6x.
Additional GVS cold check
gvs-coldis the cold-cache scenario with GVS enabled. It usesBENCH_SCENARIOS=gvs-coldand pins aube withnpm_config_enable_global_virtual_store=true.On PR head, aube is 1.6x faster than pnpm and 1.1x faster than Bun in this scenario.
Benchmark section generated by Codex.