Problem
Condensation.forgotten_event_ids is list[EventID]. The apply() method does event.id not in self.forgotten_event_ids — an O(F) lookup per event where F is the number of forgotten events. Each condensation application is O(V×F). With K condensations over a conversation's lifetime, View.from_events replays all K, compounding to O(K×V×F).
Location: event/condenser.py:14, 91
Evidence
Code at event/condenser.py:91. The field is declared as list[EventID] at line 14.
Severity: Medium (will be addressed by incremental view work)
Impact of fix
Condensation application becomes O(V) instead of O(V×F).
Fix
Change list[EventID] to set[EventID]. Trivial.
Note: the planned incremental view work will make this less impactful since View.from_events won't replay the full history.
Related issues and PRs
Discovered during profiling investigation, May 2026. openhands-sdk v1.19.1.
Problem
Condensation.forgotten_event_idsislist[EventID]. Theapply()method doesevent.id not in self.forgotten_event_ids— an O(F) lookup per event where F is the number of forgotten events. Each condensation application is O(V×F). With K condensations over a conversation's lifetime,View.from_eventsreplays all K, compounding to O(K×V×F).Location:
event/condenser.py:14, 91Evidence
Code at
event/condenser.py:91. The field is declared aslist[EventID]at line 14.Severity: Medium (will be addressed by incremental view work)
Impact of fix
Condensation application becomes O(V) instead of O(V×F).
Fix
Change
list[EventID]toset[EventID]. Trivial.Note: the planned incremental view work will make this less impactful since
View.from_eventswon't replay the full history.Related issues and PRs
Discovered during profiling investigation, May 2026. openhands-sdk v1.19.1.