gabriel / musehub public
perf patch fix/parallel-push-objects #1 / 1
gabriel · 71 days ago · Apr 12, 2026 · Diff

perf: parallel backend.put() in wire_push_objects

Sequential puts at ~200ms/object × 400 objects = ~80s, exceeding Cloudflare's 100s origin timeout. asyncio.gather() runs all puts concurrently so latency ≈ max(single object latency).

Also replaces N individual pg_insert calls with one bulk INSERT ON CONFLICT DO NOTHING — 1 DB round-trip regardless of object count.

sha256:b0eff14767b3ff232069f1f95e5f64ed72db41ca309d5f6feef4011c3b0ace62 sha
sha256:b943be0022db5401c42c0f380952d1958c53df371c3d9c586a95be17f90ca398 snapshot
← Older Oldest on fix/parallel-push-objects
All commits
Newer → Latest on fix/parallel-push-objects

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