⚡ Bolt: [performance improvement] Bulk process symbol upserts in Indexer#92
⚡ Bolt: [performance improvement] Bulk process symbol upserts in Indexer#92ishaanxgupta wants to merge 1 commit intomainfrom
Conversation
Replaced individual symbol upserts with bulk processing in `Indexer._process_file` to reduce database overhead. - Added `upsert_symbols_bulk` in `CodeGraphClient` using UNWIND. - Created `embed_texts` in `src/pipelines/ingest.py` for batch embedding. - Modified `Indexer._process_file` to collect all symbols and perform bulk inserts in Pinecone, Neo4j, and MongoDB.
|
👋 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: Replaced individual symbol upserts with bulk processing in
Indexer._process_file.🎯 Why: Indexing large files with many symbols caused severe N+1 query overhead, as each symbol change resulted in sequential write requests to MongoDB, Pinecone, and Neo4j, as well as sequential embedding generations.
📊 Impact: Significantly reduces indexing latency by batching database writes and embeddings. A file with 100 symbols will now trigger ~3 bulk API calls instead of 300 individual calls.
🔬 Measurement: Run a scan against a repository (
scan_repo). Observe the overall scan duration logged induration_secondsto verify improved performance.PR created automatically by Jules for task 17930675043780213757 started by @ishaanxgupta