fix: eliminate 850ms cold-import penalty on first push
Two lazy imports inside enqueue_push_intel (musehub_intel_providers — 2700 lines, and musehub_domain_models) were executing cold on the first push request, blocking the asyncio event loop for ~850ms while Python parsed and executed both modules.
Moved both imports to module level in musehub_jobs.py. Also moved the enqueue_push_intel/enqueue_profile_snapshot import in musehub_wire.py to module level for the same reason.
Also separated enqueue from the main data commit so the SELECT IN check runs against an empty session (no autoflush of staged snapshot/commit rows), and added YIELD LATENCY instrumentation to prove streaming latency was not the cause.
Result: 1.36s → 0.36s warm, 0.45s first-request.
sha256:02c83bb8bd449e68b9c4cc8d34134a22191f3b32ea21202c500ab908becf5c4b
sha
sha256:4f0e72fc5b9ef83b3463928a0b766bc320a9f27ff33cca6bfc1c3b54fe6e8800
snapshot
Older
fix: batch enqueue_push_intel from O(N) to O(1) DB round-trips
sha256:34844ccdc278ce0371354d4b298302848ce48f8399946af20d41dd7a1ef5d8cd
All commits
Newer
perf: merge profile.snapshot into push intel batch — saves one S…
sha256:fb3555532c8b745813c43f33dd99e4eb623805d02ee9816e7972e74e98a80373
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:02c83bb8bd449e68b9c4cc8d34134a22191f3b32ea21202c500ab908becf5c4b --body "your comment"
No comments yet. Be the first to start the discussion.