Reduce LiveKit Over-Subscription and Context Instability in Conference Views

summary

Several conference components (GridView, SpeakerView) suffer from subscription-layer inefficiencies that create a performance bottleneck as participant counts (N) increase. While React Compiler handles basic memoization, it cannot prevent unfiltered event triggers or context reference breaks. These issues lead for example to high CPU overhead or visible video flickering during navigation which degrades the feel of the UX.

Acceptence criteria

  • useParticipants() unfiltered, called in every tile - Replace with useParticipantContext() from parent provider

  • useRemoteParticipant without updateOnlyOn - Add updateOnlyOn to track-state events only

  • Own useSortedParticipants(useRemoteParticipants(...)) subscription - Remove; receive sorted participants as prop from SpeakerView

  • Own useSortedParticipants(useRemoteParticipants(...)) subscription - Refactor; compute current speaker from lifted sorted list

  • Calls both useCinemaViewParticipants and useCurrentSpeaker (two subscriptions) - Accept participants and currentSpeakerId as props from SpeakerView