⚡ Bolt: [performance improvement] Concurrent tool execution in Retrieval Pipelines#90
⚡ Bolt: [performance improvement] Concurrent tool execution in Retrieval Pipelines#90ishaanxgupta wants to merge 1 commit intomainfrom
Conversation
…val pipelines to use asyncio.gather for parallel tool calls and multi-repo searches, drastically reducing latency by avoiding sequential network bottlenecks.
|
👋 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: The optimization refactors sequential
forloops into concurrent execution usingasyncio.gatherfor LLM tool executions (_execute_tool) in bothRetrievalPipelineandCodeRetrievalPipeline. It also refactors_search_symbolsand_search_filesto search multiple repositories in parallel.🎯 Why: When an LLM decides to use multiple tools (e.g., searching for semantic vectors, asking a graph database, looking up profiles), these calls are independent. Sequentially executing them in a
forloop unnecessarily throttles the process and compounds external latency. Fetching them concurrently hides the latency behind the slowest request.📊 Impact: Reduces total tool execution time significantly. If the LLM makes 3 tool calls taking 200ms, 300ms, and 400ms respectively, the wait time drops from ~900ms to ~400ms. Similarly, querying 5 repositories will now be as fast as the single slowest repository query.
🔬 Measurement: Use telemetry logs; trace the elapsed time
tool_msfor tool execution blocks and note the overall turn execution time dropping linearly with the number of parallel tools called.PR created automatically by Jules for task 3952276918833983431 started by @ishaanxgupta