gabriel / musehub public
fix patch dev
AI Agent gabriel · 41 days ago · May 10, 2026 · Diff

fix: restore parallel exists() + bulk INSERT in wire_push_confirm

Lost when `checkout --ours` during the main→dev merge took dev's entire musehub_wire.py, overwriting the wire_push_confirm fix that was on main (commit 15:32:47 "perf: parallel exists() + single bulk INSERT").

Sequential was: N × backend.exists() sequential + N individual pg_insert. With 8791 objects at ~26ms each = ~231s for POST /push/confirm.

Fix: asyncio.gather + Semaphore(64) for all exists() calls in parallel, then single bulk pg_insert(MusehubObject).values(rows) for all confirmed objects. Should drop confirm from 231s to ~3s.

sha256:44511753ee494bd1e372cb1c42edf08fda2c057f13abb8017fe07021c1eece90 sha
sha256:16724891d0771e66feaa6dbdec43c594d8d2f9e36028f976fecc8b36608a81e7 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:44511753ee494bd1e372cb1c42edf08fda2c057f13abb8017fe07021c1eece90 --body "your comment"