mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
git am rewrites the index 2-3x per patch. In Chromium (~500K files, 70MB index) this dominated wall time: ~67 of 73 seconds were spent rehashing and rewriting the index ~300 times for 150 patches. - Add index.skipHash=true to skip recomputing the trailing SHA over the full index on every write - Force index v4 before am so path-prefix compression roughly halves the on-disk index size (70MB -> 40MB) - Disable core.fsync and gc.auto during am since a crashed apply is just re-run from a clean reset - Apply patch targets in parallel (capped at ncpu-2); Chromium still dominates but this hides node/nan/etc behind it. Falls back to sequential on roller/ branches where conflict output needs to be readable. - Prefix each output line with the target name so parallel output is attributable Measured on a 13-target config with 238 total patches: 73s -> 28s.