gabriel / muse public
perf dev
AI Agent gabriel · 121 days ago · May 11, 2026 · Diff

perf: skip build_push_objects entirely on bundle push path

build_push_objects read all 5162 object blobs (129 MB) to compute n_objects for the routing decision — then on the bundle path its result was thrown away.

Routing now uses len(commit_walk['all_object_ids']) which is free (already computed by walk_commits). build_push_objects only runs on the stream path where its result is actually used.

Eliminates ~4s of dead object loading on every large push.

sha256:bdc869fbdafb6a6c2bcd103d3fc9372e5ad1caa63e91fb8393d4eec67368db14 sha
+22 ~1 symbols
sha256:d49d6ca62bf2c6b82f0ed3ab16a0b3514b15cd1b145be1702e000212c60d4712 snapshot
+22
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 23 symbols
~ tests/test_push_object_loading.py .py 22 symbols added
+ _BLOB_SIZE variable variable _BLOB_SIZE L42–42
+ _FILES_CHANGED variable variable _FILES_CHANGED L41–41
+ _N_COMMITS variable variable _N_COMMITS L40–40
+ _N_FILES variable variable _N_FILES L39–39
+ _make_repo function function _make_repo L45–113
+ CommitRecord import import CommitRecord L28–28
+ SnapshotRecord import import SnapshotRecord L28–28
+ _PRESIGN_OBJECT_THRESHOLD import import _PRESIGN_OBJECT_THRESHOLD L36–36
+ annotations import import annotations L19–19
+ blob_id import import blob_id L35–35
+ build_push_objects import import build_push_objects L36–36
+ compute_commit_id import import compute_commit_id L27–27
+ compute_snapshot_id import import compute_snapshot_id L27–27
+ datetime import import datetime L21–21
+ muse_dir import import muse_dir L26–26
+ pathlib import import pathlib L22–22
+ walk_commits import import walk_commits L25–25
+ write_branch_ref import import write_branch_ref L28–28
+ write_commit import import write_commit L28–28
+ write_object import import write_object L24–24
+ write_snapshot import import write_snapshot L28–28
+ test_walk_object_count_matches_push_objects_count function function test_walk_object_count_matches_push_objects_count L116–139
~ muse/cli/commands/push.py .py 1 symbol modified
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:bdc869fbdafb6a6c2bcd103d3fc9372e5ad1caa63e91fb8393d4eec67368db14 --body "your comment"