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
[Tracking] Large customer account performance and UX support #80560
This is a tracking issue for proactive and direct support of one of our largest users. Our goal is to track their performance and metrics, monitor crashes and errors so that we can fix them proactively.
Their performance is going to suffer from the large amounts of data, but that should be a good example for us to address and improve iteratively using the spans and profiling from Sentry. They can also provide a tight feedback loop on the issues they are experiencing, which is a great opportunity for us.
⚠️IMPORTANT: Please make sure not to post any customer data, domain names and names in general in the issue.
I found a Sentry trace where user spent ~30 seconds in createOptionList. The profile is very fragmented but the common pattern is thousands of short executions of functions that iterate over all policies. This lines up with what we know about the account having a few thousand policies
I started scanning the codebase for places where we iterate over entire policies collection. The plan is to remove or optimize those where possible, and add unit + regression tests where it makes sense
As a next step, we could do a broader audit of the codebase to validate all usages of full-collection iteration and see where we can eliminate them entirely.
The Sentry profile originates from OptionsListContextProvider, which we plan to remove soon. As discussed with @mountiny, we want to offload that work to the community. That said, removing the provider alone likely won't fix this issue - the expensive full-collection iterations will still run regardless of the surrounding implementation when opening search screens
I started scanning the codebase for places where we iterate over entire policies collection. The plan is to remove or optimize those where possible, and add unit + regression tests where it makes sense
@TMisiukiewicz I was thinking about this as well and I think to applies to other callections as well like reports, transaction, etc. Maybe we can start by investigating components that rely on a single policy/report/transaction, but they still subscribe to the whole collections?
Maybe we can start by investigating components that rely on a single policy/report/transaction, but they still subscribe to the whole collections?
Yeah we can start looking into that as well, but we need to be super careful with this. Very often it's a performance optimization to avoid using useOnyx inside list item
changed the title [-][Due for payment 2026-05-29] [Tracking] Large customer account performance and UX support[/-][+][Tracking] Large customer account performance and UX support[/+]on May 29, 2026
Activity
TMisiukiewicz commentedon Feb 2, 2026
I found a Sentry trace where user spent ~30 seconds in
createOptionList. The profile is very fragmented but the common pattern is thousands of short executions of functions that iterate over all policies. This lines up with what we know about the account having a few thousand policiesI started scanning the codebase for places where we iterate over entire policies collection. The plan is to remove or optimize those where possible, and add unit + regression tests where it makes sense
As a next step, we could do a broader audit of the codebase to validate all usages of full-collection iteration and see where we can eliminate them entirely.
The Sentry profile originates from
OptionsListContextProvider, which we plan to remove soon. As discussed with @mountiny, we want to offload that work to the community. That said, removing the provider alone likely won't fix this issue - the expensive full-collection iterations will still run regardless of the surrounding implementation when opening search screensyoussef-lr commentedon Feb 2, 2026
@TMisiukiewicz I was thinking about this as well and I think to applies to other callections as well like reports, transaction, etc. Maybe we can start by investigating components that rely on a single policy/report/transaction, but they still subscribe to the whole collections?
TMisiukiewicz commentedon Feb 3, 2026
Opened PR #81297
Yeah we can start looking into that as well, but we need to be super careful with this. Very often it's a performance optimization to avoid using
useOnyxinside list item156 remaining items
[-][Due for payment 2026-05-29] [Tracking] Large customer account performance and UX support[/-][+][Tracking] Large customer account performance and UX support[/+]melvin-bot commentedon Jun 1, 2026
@hungvu193 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
melvin-bot commentedon Jun 3, 2026
@hungvu193 10 days overdue. Is anyone even seeing these? Hello?
melvin-bot commentedon Jun 5, 2026
@hungvu193 12 days overdue. Walking. Toward. The. Light...
quinthar commentedon Jun 7, 2026
Approved $250 to @abzokhattab
abzokhattab commentedon Jun 8, 2026
should we close this ticket?
melvin-bot commentedon Jun 8, 2026
This issue has not been updated in over 14 days. @TMisiukiewicz, @hungvu193, @mallenexpensify, @mountiny, @abzokhattab, @kacper-mikolajczak eroding to Weekly issue.
mountiny commentedon Jun 9, 2026
Yeah I think we can, we do track these for individual large customers