Make fewer git process starts per engine operation #262

Closed
opened 2026-10-27 22:18:08 -05:00 by ethan-hann · 1 comment
Owner

The 2026-10-27 test speed analysis timed every git call in the slowest Core test classes: 17 to 158 git calls per test case, with a median of about 45 ms each, close to the cost of starting git with no work (39-49 ms). Process starts are roughly 50-60% of those classes' time, and every git start also costs players on slow machines (D70). Find the engine operations that start git most often (status, capture, switch, preview) and batch or merge calls (for example one git status --porcelain=v2 instead of several reads, --batch modes, reusing an index read), test-first, measuring the time of a capture and a switch on a large seeded folder before and after. About 2 CI minutes per 10% fewer calls.

The 2026-10-27 test speed analysis timed every git call in the slowest Core test classes: 17 to 158 git calls per test case, with a median of about 45 ms each, close to the cost of starting git with no work (39-49 ms). Process starts are roughly 50-60% of those classes' time, and every git start also costs players on slow machines (D70). Find the engine operations that start git most often (status, capture, switch, preview) and batch or merge calls (for example one `git status --porcelain=v2` instead of several reads, `--batch` modes, reusing an index read), test-first, measuring the time of a capture and a switch on a large seeded folder before and after. About 2 CI minutes per 10% fewer calls.
ethan-hann added this to the Code Cleanup milestone 2026-10-27 22:18:08 -05:00
Author
Owner

Shipped in SavePoint 0.9.22 (PR #274). A capture now starts fewer git processes (first 8 to 5, later 5 to 4, watched 7 to 5, the estimate before the first capture 1 to 0). The switch, check switch, status and preview candidates, and a median-of-several timing, moved to #273.

Shipped in [SavePoint 0.9.22](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.22) (PR #274). A capture now starts fewer git processes (first 8 to 5, later 5 to 4, watched 7 to 5, the estimate before the first capture 1 to 0). The switch, check switch, status and preview candidates, and a median-of-several timing, moved to #273.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#262
No description provided.