SurfSense/surfsense_backend/app/agents/researcher
Claude 5fac3db849
Parallelize connector searches for 40-60% latency improvement
- Added asyncio.gather() to run all connector searches concurrently
- Replaced sequential for-loop (~600 lines) with parallel execution
- Added search_single_connector() helper function for cleaner code
- Added CONNECTOR_EMOJIS and CONNECTOR_RESULT_NAMES mappings
- Streams "Searching N sources in parallel" before concurrent execution
- Processes results as they complete and streams found counts

Before: 20 connectors × ~1s each = ~20s total
After: All connectors run simultaneously = ~2-3s total

This is the highest impact performance optimization identified in the audit.
2025-11-18 23:00:02 +00:00
..
qna_agent chore: update configuration for rerankers 2025-10-29 23:23:08 -07:00
__init__.py Fixed current agent citation issues and added sub_section_writer agent for upcoming SurfSense research agent 2025-04-13 20:47:23 -07:00
configuration.py feat: added top_k in chat Interface. 2025-11-06 13:25:05 -08:00
graph.py feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
nodes.py Parallelize connector searches for 40-60% latency improvement 2025-11-18 23:00:02 +00:00
prompts.py feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
state.py feat(removed): sub_section_writer 2025-10-27 20:30:10 -07:00
utils.py feat: Implement local-first European AI architecture with Mistral NeMo and TildeOpen 2025-11-17 19:58:20 +02:00