You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The voice-event aggregation block was the dominant cost on heavy
packages and the reason why the worker was hitting the 15-min Lambda
timeout:
for join in sorted_joins:
next_leave = next((l for l in sorted_leaves if l['timestamp'] >= join['timestamp']), None) # O(m) per join
...
join_is_included_in_duration = any(... for e in voice_channel_logs_duration) # O(k) per join
Replace with two bisects:
- bisect_left on the sorted leave-timestamps list to find the next leave
- bisect_right on a parallel sorted list of accepted-event start times to
cheaply detect overlapping joins (Discord voice events don't overlap
per user, so only the rightmost candidate needs checking)
Same shape of voice_channel_logs_duration coming out, downstream code
unchanged.
0 commit comments