Skip to content

state: Batch reads during trunk migration - #1494

Merged
abhinav merged 1 commit into
mainfrom
batch-trunk-migration
Oct 26, 2026
Merged

abhinav merged 1 commit into
mainfrom
batch-trunk-migration

Conversation

@abhinav

@abhinav abhinav commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Changing the configured trunk inspects every tracked branch before
updating branches based on the old trunk.
Read those records together instead of starting a read for each branch,
retaining the existing batch write and all unrelated branch metadata.

On macOS arm64, paired immutable binaries compare this branch with its
actual parent, main at 4bfae2c, using identical real-Git fixtures.
Five samples of three migrations alternate parent/candidate order;
all writes remain timed and the trunk alternates each iteration.
Values are median milliseconds per complete migration.

Tracked branches Parent (ms/op) This branch (ms/op)
1 77.25 75.70
100 1934.77 679.83

[skip changelog]: improvement is for a rare case (trunk change, many branches)

Changing the configured trunk inspects every tracked branch before
updating branches based on the old trunk.
Read those records together instead of starting a read for each branch,
retaining the existing batch write and all unrelated branch metadata.

On macOS arm64, paired immutable binaries compare this branch with its
actual parent, main at 4bfae2c, using identical real-Git fixtures.
Five samples of three migrations alternate parent/candidate order;
all writes remain timed and the trunk alternates each iteration.
Values are median milliseconds per complete migration.

| Tracked branches | Parent (ms/op) | This branch (ms/op) |
| --- | ---: | ---: |
| 1 | 77.25 | 75.70 |
| 100 | 1934.77 | 679.83 |

[skip changelog]: improvement is for a rare case (trunk change, many branches)
@abhinav

abhinav commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@abhinav
abhinav enabled auto-merge (squash) October 26, 2026 01:59
@abhinav
abhinav merged commit 43cc5a6 into main Oct 26, 2026
22 checks passed
@abhinav
abhinav deleted the batch-trunk-migration branch October 26, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant