gabriel / muse public
perf patch dev
gabriel · 62 days ago · Apr 14, 2026 · Diff

perf: blame deque + skip unchanged; commit skip unmodified object writes

- blame._walk_ancestry: replace list.pop(0)/insert(0) with deque.popleft()/appendleft() — O(1) vs O(n) per step - blame.blame_file: skip _read_file_at_commit when file object_id is unchanged between commits; only run SequenceMatcher at actual change boundaries - commit.run: skip write_object_from_path for files whose object_id matches the parent manifest — objects already in store, saves N stat calls per commit where N is unchanged file count

Tests: test_walk_ancestry_uses_deque (structural), test_blame_skips_read_for_unchanged_commits (behavioral, ≤4 reads for 10-commit chain with 1 change)

Full suite: 15890 passed

sha256:517bb0b235019f0aefd5da41e683440db35b511b89180331caea65de95f07b18 sha
sha256:d9ab3fa4f614c7a3b2021f59fa1a3045b323364d51812335e9b6935072ccdf79 snapshot
← 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:517bb0b235019f0aefd5da41e683440db35b511b89180331caea65de95f07b18 --body "your comment"