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
[Due for payment 2025-05-30] [CRITICAL] Investigate performance issues when deleting expenses from Reports page #59825
AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff
Version Number: Reproducible in staging?: Reproducible in production?: If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@JmillsExpensify Slack conversation (hyperlinked to channel name): https://expensify.slack.com/archives/C05LX9D6E07/p1743598259881369
Action Performed:
Break down in numbered steps
Using very heavy account similar to Jason's
Go to the Reports page
Delete some expense
Expected Result:
Describe what you think should've happened
The app should not show signs of slowing down
Actual Result:
Describe what actually happened
The app grinds to halt
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
@TMisiukiewicz I see you are starred on this GH - are you investigating this? I'm adding an Internal label - I assume this needs to be internal but let me know if I can open this up to External
While using heavy account I noticed we already have a lot of heavy operations going on when opening a report so the CPU might be hit even before going to report details and pressing Delete. It's because SearchAutocompleteList is rendered all the time (just hidden behind display: none) and it recomputes entire options list in the context on each report collection item update even if it's hidden and not related to action user is doing. When we open an expense from a list, it updates a couple of reports and that triggers the computations. While it works fine on smaller accounts, it gets pretty complex for bigger ones. Actually once Search is visited, the options are regenerated from scratch on each merge to reports collection so CPU gets hit pretty often.
I tried building a PoC with exposing sourceValue to useOnyx with collection items and it seems when used in the OptionListContextProvider, it reduces this overhead to the minimum. I'll do some cleanup on Monday and open PRs in Onyx and E/App repos so you can verify it.
I haven't tested it yet but I'm wondering if this solution going to work properly with deleted items as well 🤔 Are deleted reports entirely removed from Onyx or they have any specific status set that indicates those expenses are deleted? I'm wondering if I am able to catch those by sourceValue or not, because if they are not changed through mergeCollection while being deleted, I have to think additional approach to remove the options for such reports without recomputing everything
I'm working on proper implementing it to OptionListContextProvider, I think the only thing that left is that the same report now appears for me twice in the options list. Once it's fixed, it'll reduce some heavy computations on large accounts, from my initial measurements on our heavy account on web, depending on an action user is performing, it's 500-1000ms less calculations whenever doing something on Search screen, e.g. opening an expense, updating its description/merchant etc. It'll also reduce computations on any action that is doing changes on reports collection, like sending/receiving a message.
Yet I haven't tested it with deleting an expenses, but I think it should be doable as well.
Unsure of status to put on this, seems not not-important.
Deleting expenses from a reports page seems like a common-enough action that users would take, which makes me lean towards HIGH.
CRITICAL - UX Reliability, API Reliability and Performance bugs that are noticeable for a majority of users
HIGH - UX Reliability, API Reliability and Performance issues that are part of main flows and affect a subset of users
MEDIUM - Debugging Tools to help make fixing existing bugs easier and getting fixes to customers faster and Architectural Improvements to the underlying framework and design of the app to improve performance, scalability, and maintainability
LOW - Not very noticeable UX Reliability, API Reliability or Performance issues that only affect a single user or subset of users
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.50-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@allroundexperts@Christinadobrzyn@allroundexperts The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff
Activity
melvin-bot commentedon Apr 8, 2025
Current assignee @mountiny is eligible for the AutoAssignerNewDotQuality assigner, not assigning anyone new.
melvin-bot commentedon Apr 8, 2025
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Christinadobrzyn commentedon Apr 9, 2025
@TMisiukiewicz I see you are starred on this GH - are you investigating this? I'm adding an Internal label - I assume this needs to be internal but let me know if I can open this up to External
mountiny commentedon Apr 9, 2025
Yeah he is on it
TMisiukiewicz commentedon Apr 11, 2025
While using heavy account I noticed we already have a lot of heavy operations going on when opening a report so the CPU might be hit even before going to report details and pressing
Delete. It's becauseSearchAutocompleteListis rendered all the time (just hidden behinddisplay: none) and it recomputes entire options list in the context on each report collection item update even if it's hidden and not related to action user is doing. When we open an expense from a list, it updates a couple of reports and that triggers the computations. While it works fine on smaller accounts, it gets pretty complex for bigger ones. Actually once Search is visited, the options are regenerated from scratch on each merge toreportscollection so CPU gets hit pretty often.I tried building a PoC with exposing
sourceValuetouseOnyxwith collection items and it seems when used in theOptionListContextProvider, it reduces this overhead to the minimum. I'll do some cleanup on Monday and open PRs in Onyx and E/App repos so you can verify it.I haven't tested it yet but I'm wondering if this solution going to work properly with deleted items as well 🤔 Are deleted reports entirely removed from Onyx or they have any specific status set that indicates those expenses are deleted? I'm wondering if I am able to catch those by
sourceValueor not, because if they are not changed throughmergeCollectionwhile being deleted, I have to think additional approach to remove the options for such reports without recomputing everythingTMisiukiewicz commentedon Apr 14, 2025
Created draft PR for onyx with exposing
sourceValueforuseOnyxhook: Expensify/react-native-onyx#627I'm working on proper implementing it to
OptionListContextProvider, I think the only thing that left is that the same report now appears for me twice in the options list. Once it's fixed, it'll reduce some heavy computations on large accounts, from my initial measurements on our heavy account on web, depending on an action user is performing, it's 500-1000ms less calculations whenever doing something on Search screen, e.g. opening an expense, updating its description/merchant etc. It'll also reduce computations on any action that is doing changes on reports collection, like sending/receiving a message.Yet I haven't tested it with deleting an expenses, but I think it should be doable as well.
mallenexpensify commentedon Apr 14, 2025
Unsure of status to put on this, seems not not-important.
Deleting expenses from a reports page seems like a common-enough action that users would take, which makes me lean towards HIGH.
53 remaining items
melvin-bot commentedon May 23, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.50-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-05-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 23, 2025
@allroundexperts @Christinadobrzyn @allroundexperts The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
mountiny commentedon May 27, 2025
Last PR was merged, but lets await regression period
Christinadobrzyn commentedon May 29, 2025
@allroundexperts do we need a regression test for this?
Payment summary here - #59825 (comment)
moving to daily since payment is tomorrow.
allroundexperts commentedon Jun 1, 2025
I don't think a checklist is needed here @Christinadobrzyn.
melvin-bot commentedon Jun 2, 2025
@Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick!
Christinadobrzyn commentedon Jun 2, 2025
Awesome, thanks @allroundexperts! No regression test created.
Payment summary here - #59825 (comment)
@allroundexperts please make sure to reach out for payment via ND. TY!
JmillsExpensify commentedon Jun 13, 2025
$250 approved for @allroundexperts