Files
livekit/pkg
Harsh Gupta e400c8214b rtc: avoid O(N*M) subscriber scan in RevokeDisallowedSubscribers (#5272)
* rtc: avoid O(N*M) subscriber scan in RevokeDisallowedSubscribers

Replace repeated linear slices.Contains scans in MediaTrackReceiver and DataTrack RevokeDisallowedSubscribers with an O(N + M) map lookup above allowedSubscribersMapThreshold (8), short-circuit when there are no subscribers, and avoid holding DataTrack.lock while building the allowlist set.

* rtc: cover boundary, empty-allowlist, and concurrent cases for RevokeDisallowedSubscribers

* rtc: fold threshold check into buildAllowedSubscriberSet
2026-11-25 22:40:42 +05:30
..
2025-11-28 21:51:53 +05:30