conciergeReportID was previously subscribed via useOnyx inside OptionRowLHNData, meaning each visible LHN row created its own independent Onyx subscription to the same key. With ~20 rows visible, that was ~20 identical subscriptions. This PR hoists the single subscription to LHNOptionsList and passes the value down as a prop, reducing it to 1 subscription.
NavigationTabBar was subscribing to useReportAttributes() (which pulls DERIVED.REPORT_ATTRIBUTES, a key with ~12 Onyx dependencies) solely to call getChatTabBrickRoad(). This PR moves that computation into the SidebarOrderedReportsContextProvider — it already holds reportAttributes and orderedReportIDs — and exposes chatTabBrickRoad through the existing context. NavigationTabBar now reads it from context with zero new subscriptions.
Reassure shows no regression. React Profiler across 5 Pusher message cycles shows -6% commits and -5.4% total render duration on branch vs main.
PR: #87601
Issue Owner
Current Issue Owner: @mallenexpensify
conciergeReportID was previously subscribed via useOnyx inside OptionRowLHNData, meaning each visible LHN row created its own independent Onyx subscription to the same key. With ~20 rows visible, that was ~20 identical subscriptions. This PR hoists the single subscription to LHNOptionsList and passes the value down as a prop, reducing it to 1 subscription.
NavigationTabBar was subscribing to useReportAttributes() (which pulls DERIVED.REPORT_ATTRIBUTES, a key with ~12 Onyx dependencies) solely to call getChatTabBrickRoad(). This PR moves that computation into the SidebarOrderedReportsContextProvider — it already holds reportAttributes and orderedReportIDs — and exposes chatTabBrickRoad through the existing context. NavigationTabBar now reads it from context with zero new subscriptions.
Reassure shows no regression. React Profiler across 5 Pusher message cycles shows -6% commits and -5.4% total render duration on branch vs main.
PR: #87601
Issue Owner
Current Issue Owner: @mallenexpensify