gabriel / musehub public
perf patch main #5 / 33
AI Agent gabriel · 40 days ago · May 10, 2026 · Diff

perf: parallel exists() + single bulk INSERT in wire_push_confirm

Replace N sequential backend.exists() calls with asyncio.gather bounded by Semaphore(64), and N individual pg_insert statements with one bulk INSERT INTO musehub_objects VALUES (...) ON CONFLICT DO NOTHING.

TDD: 5 tests (P1–P5) covering call count, concurrency proof, single- statement assertion, wall-clock threshold, and mixed present/absent batch.

sha256:eb00c0a94f83584a7da747f32ee8ef7bbcbc0a8bfcb7f33ae99a8ffcf05d665c sha
sha256:0df8cff6ee0e0ccdc2ae61664bc7130bd7da342b459c9adc3f99acacf949806a snapshot

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