Merge pull request #73 from aguzererler/perf/optimize-team-filtering-5153644847450952095

 [optimize team filtering loop performance]
This commit is contained in:
ahmet guzererler 2026-03-21 23:01:11 +01:00 committed by GitHub
commit 415ab75415
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -305,8 +305,9 @@ def update_display(layout, spinner_text=None, stats_handler=None, start_time=Non
# Filter teams to only include agents that are in agent_status
teams = {}
active_agent_status_keys = set(message_buffer.agent_status.keys())
for team, agents in all_teams.items():
active_agents = [a for a in agents if a in message_buffer.agent_status]
active_agents = [a for a in agents if a in active_agent_status_keys]
if active_agents:
teams[team] = active_agents