Skip to content

[Due for payment 2026-06-01] [No QA] perf: freeze WorkspacesListPage when blurred to avoid rerender storm on workspace navigation #91169

@mountiny

Description

@mountiny

Problem

WorkspacesListPage subscribes to the entire COLLECTION.POLICY key without a selector and uses unstable inline renderItem and row props. When a user opens a tab inside a workspace (e.g. Workflows), openPolicyWorkflowsPage performs an optimistic Onyx.merge on the policy entry. Because WorkspacesListPage remains mounted but blurred, that merge triggers a full re-render of the list and every row — a rerender storm during normal workspace navigation.

Solution

Split the component into a thin WorkspacesListPage wrapper and a WorkspacesListPageContent inner component, then wrap the inner component with FreezeWrapper from @libs/Navigation/AppNavigator/FreezeWrapper. While the screen is blurred, FreezeWrapper suspends the React tree so Onyx updates that arrive during the visit are batched and applied only when the user returns to the page.

PR

#90970

Issue OwnerCurrent Issue Owner: @abzokhattab

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

SUBISSUE

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions