SurfSense/surfsense_backend/app/agents
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
..
podcaster refactor(ux): Enhance podcast and chat panel features 2025-11-11 18:07:32 -08:00
researcher Parallelize connector searches for 40-60% latency improvement 2025-11-18 23:00:02 +00:00
__init__.py feat: Added chat_history to researcher agent 2025-05-10 20:06:19 -07:00