]> git.giacomolli.uk - onechat/commit
Start the builds in the order of the messages
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 15:24:07 +0000 (12:24 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 15:24:07 +0000 (12:24 -0300)
commitecf2974df6ab9222978c259fdbb091fc8f8f4369
tree8408efe138c2e9cda9b9850d125922e833946eee
parentd4dc9a3b10a6092d18fb30cfb36526556aa33227
Start the builds in the order of the messages

The queue starts the node whose context ends first: a leaf ends before
its message and a merge after its last message, and at a tie the merge
starts first. With leaves before all merges, a backlog of long messages
kept back the merges that a batch needs, so the view could not shrink.
The merges wait in a heap by the end of their context, so the next build
is found without a scan. The leaf window of 8 unbuilt leaves and the
limit of 8 builds stay as they are.

Issue: beb9a70
queue.go
queue_test.go [new file with mode: 0644]