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
{{ message }}
Repository navigation
[Performance] Remove app-wide policy categories and tags subscriptions #100808
OnyxListItemProvider stays mounted for the whole app session. It currently subscribes to the full POLICY_CATEGORIES and POLICY_TAGS collections.
These subscriptions run a multiGet for every collection member when they start. They also rebuild the full collection object when any member changes.
Only three places use this data, and each place needs the categories or tags for one policy only.
What is the impact of this on end-users?
These subscriptions add unnecessary Onyx work for every app session. The impact can be larger for high-traffic accounts with many policies, categories, or tags.
There is no expected UI behavior change from removing them.
List any benchmarks that show the severity of the issue
Profiling showed two collection-wide subscriptions that stay active for the whole app session.
More context and a profiling screenshot are available in this comment.
Proposed solution
Subscribe directly to the required policy key in each consumer:
Read POLICY_CATEGORIES${policyID} in MoneyRequestView.
Read POLICY_TAGS${targetPolicyID} in MoneyRequestView.
Read POLICY_CATEGORIES${policyID} in IOURequestStepConfirmation.
Remove PolicyCategoriesProvider and PolicyTagsProvider from OnyxListItemProvider.
Remove their exported hooks.
Add tests to confirm categories and tags still come from the correct workspace.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.77-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
melvin-bot commentedon Sep 15, 2026
@Julesssss / @cristipaval @LukasMod
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.77-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
cristipaval commentedon Sep 15, 2026
the PR for this one went into prod. No payment is due here