⚡ Bolt: Use chunked MGET for Redis hydration#111
Conversation
Co-authored-by: d3mocide <136547209+d3mocide@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Replace pipelined individual GETs with chunked MGET calls (batches of 5000) and increase SCAN count to 5000 when hydrating entities from Redis on poller startup.
🎯 Why: Making individual network round-trips for each entity ID causes a significant N+1 problem, blocking the event loop when dealing with thousands of aircraft during a cold start.
📊 Impact: Reduces network round-trips by roughly a factor of 5000, significantly decreasing cold start latency and event loop blocking overhead.
🔬 Measurement: Verify logs during application startup to observe the faster Redis hydration completion, and note reduced latency/cpu overhead during the "hydrated X aircraft from Redis on startup" phase.
PR created automatically by Jules for task 10880103225531445295 started by @d3mocide