Skip to content

[Due for payment 2025-02-19] [$250] Search - App freezes when opening search router when app is loading #54050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8 tasks done
vincdargento opened this issue Dec 12, 2024 · 52 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@vincdargento
Copy link

vincdargento commented Dec 12, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.75-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in to account with many reports.
  3. Trigger app loading state by going to Troubleshoot > Clear cache and restart > Reset and refresh.
  4. Open search router by CMD+K while app is still loading.
  5. Wait for a while (until the router shows report list).

Expected Result:

App will load without issue.

Actual Result:

App freezes when search router is opened when app is loading.
After a while, Chrome crashes.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021884103457756271151
  • Upwork Job ID: 1884103457756271151
  • Last Price Increase: 2025-02-04
  • Automatic offers:
    • wildan-m | Contributor | 106070845
Issue OwnerCurrent Issue Owner: @MitchExpensify
@vincdargento vincdargento added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

Triggered auto assignment to @MitchExpensify (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.

Copy link

melvin-bot bot commented Dec 16, 2024

@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MitchExpensify MitchExpensify moved this to Bugs and Follow Up Issues in #expensify-bugs Dec 16, 2024
@MitchExpensify
Copy link
Contributor

This looks BE, assigning internal and labeling #expense

@melvin-bot melvin-bot bot removed the Overdue label Dec 16, 2024
@MitchExpensify MitchExpensify added Internal Requires API changes or must be handled by Expensify staff Overdue and removed Overdue labels Dec 16, 2024
Copy link

melvin-bot bot commented Dec 20, 2024

@MitchExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Dec 20, 2024
@MitchExpensify
Copy link
Contributor

Looking for an internal volunteer here: https://expensify.slack.com/archives/C03SSAQ7P/p1734791713678349

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 21, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Dec 25, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Dec 26, 2024

@MitchExpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Dec 27, 2024

@MitchExpensify Eep! 4 days overdue now. Issues have feelings too...

@MitchExpensify
Copy link
Contributor

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 30, 2024
Copy link

melvin-bot bot commented Jan 3, 2025

@MitchExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@MitchExpensify
Copy link
Contributor

Escalating to #expense curator to see if we need to highlight this for recruitment https://expensify.slack.com/archives/C03SSAQ7P/p1735916997867839?thread_ts=1734791713.678349&cid=C03SSAQ7P

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 3, 2025
@wildan-m
Copy link
Contributor

Solution 1 (Without selective updates)
is simpler but always rebuilds the entire options list, potentially consuming more CPU and memory—especially when only a small subset of data changes.

Solution 2 targets updates selectively (existing main code):
Better CPU Performance: By avoiding unnecessary processing when only a few personal details change.
Lower Memory Footprint: By replacing only the affected parts of the reports list, thereby reducing memory allocations
The solution 2 will be worst when most of the data changes

My proposed solution is combining both cases

@QichenZhu
Copy link
Contributor

QichenZhu commented Feb 10, 2025

Thanks for your explanation.

In my tests on a 2017 iMac with a high traffic account containing 4606 contacts:

  1. Updating a single item takes around 20ms, and the time increases as more items are updated. The worst case is updating all the items individually, which takes about 40000ms.
  2. A full update takes about 80ms, and the time is nearly constant.

The selected proposal fixes the issue in the worst case and performs better in the best case, when only a single item is updated. However, are there situations between the worst and best cases? If so, this issue could still happen.

My proposal provides stable performance and addresses the root cause, while also simplifying the code.

So it's a trade-off, and I respect the decision of the C+ and internal member.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

📣 @wildan-m 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@wildan-m
Copy link
Contributor

@parasharrajat The PR is ready #56627. Thanks!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 12, 2025
@melvin-bot melvin-bot bot changed the title [$250] Search - App freezes when opening search router when app is loading [Due for payment 2025-02-19] [$250] Search - App freezes when opening search router when app is loading Feb 12, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 12, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.97-1 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-02-19. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 12, 2025

@parasharrajat @MitchExpensify @parasharrajat 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]

@parasharrajat
Copy link
Member

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: https://github.com/Expensify/App/pull/40167/files#r1957862897

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: Not needed

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Open app
  2. Log in to account with many reports.
  3. Trigger app loading state by going to Troubleshoot > Clear cache and restart > Reset and refresh.
  4. Open search router by clicking search icon in the top right or CMD+K while app is still loading.
  5. Wait for a while (until the router shows report list).
  6. Verify that app will load without issue.

Do we agree 👍 or 👎

@MitchExpensify
Copy link
Contributor

@parasharrajat
Copy link
Member

Payment requested as per #54050 (comment)

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 19, 2025
@JmillsExpensify
Copy link

$250 approved for @parasharrajat

@MitchExpensify
Copy link
Contributor

Paid and contracted ended @wildan-m

@melvin-bot melvin-bot bot removed the Overdue label Feb 23, 2025
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in #expensify-bugs Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

10 participants