gabriel / muse public
perf patch task/workspace-status-perf #1 / 1
gabriel · 62 days ago · Apr 14, 2026 · Diff

perf: parallelize workspace status and drop stash subprocess

list_workspace_members was sequential — each of N members paid for one muse status subprocess call plus a second muse stash list subprocess call. For 7 repos that was ~14 serial subprocesses ≈ 3.4 s wall time.

Two changes:

1. list_workspace_members dispatches _member_status calls concurrently via ThreadPoolExecutor(max_workers=N). Wall time is now bounded by the slowest single repo rather than the sum. Manifest order is preserved.

2. _member_status reads .muse/stash.json directly instead of spawning muse stash list --json. The stash file is a flat JSON list — a simple len() read with no subprocess overhead.

Result on a 7-member workspace: 3.35 s → 0.58 s (360% cpu confirms parallel execution).

Tests: 6 new cases covering parallelism (structural + wall-time), stash file read, empty stash, and absent stash file.

sha256:afbcfe92d64bf7e11ec8731e3288c4c975971d64dc3c4440834a0503d7be58a1 sha
sha256:8c860aefa3dfa12d1ccab00fdc37a083a51d1895695c867abaf8d57ea364ac31 snapshot
← Older Oldest on task/workspace-status-perf
All commits
Newer → Latest on task/workspace-status-perf

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:afbcfe92d64bf7e11ec8731e3288c4c975971d64dc3c4440834a0503d7be58a1 --body "your comment"