The server no longer waits for git

When the configuration is saved, checked or makes a repository restart its agents, the Obeya server used to run its git calls one after the other and answer nothing meanwhile. The board looked frozen. Now git runs without blocking the server: all repositories are read at once, and the server keeps answering throughout.

Longest time the server answered nothing

A scratch Obeya with 6 canvases and 9 repositories, the code before (main) and after this change side by side. A request every few milliseconds; the longest wait for an answer during each action. Median of 5 runs.

BeforeAfter

What this means on a real machine

The scratch repositories are tiny and the machine was idle, so each git call took a few milliseconds. On the owner's Mac, with large repositories and agents at work, each call took around 100 ms: stalls.log recorded 19 server freezes between 2 and 5 November, up to 4.7 s, when a save re-read every repository of every canvas. These freezes came from the code paths changed here; none of them waits for git any more.

What changed

The numbers

Spawning processes as such was checked as well: on an idle Mac, starting a git process takes about 0.16 ms, and Obeya already starts at most four per turn of the event loop, so the server gets to answer in between. With fewer git calls overall, that cost shrinks too.