Skip to content

Follow up for "add search input to mobile search page issue" #57191

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
6 tasks done
SzymczakJ opened this issue Feb 20, 2025 · 28 comments
Closed
6 tasks done

Follow up for "add search input to mobile search page issue" #57191

SzymczakJ opened this issue Feb 20, 2025 · 28 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2

Comments

@SzymczakJ
Copy link
Contributor

SzymczakJ commented Feb 20, 2025

@luacmartins luacmartins self-assigned this Feb 20, 2025
@luacmartins luacmartins added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

Triggered auto assignment to @NicMendonca (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 Feb 24, 2025

@luacmartins, @NicMendonca, @ikevin127, @SzymczakJ Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Feb 24, 2025
@SzymczakJ
Copy link
Contributor Author

WIP, I started looking at the performance of Reports page.

@melvin-bot melvin-bot bot removed the Overdue label Feb 24, 2025
@dylanexpensify dylanexpensify moved this to Bugs and Follow Up Issues in #expensify-bugs Feb 25, 2025
@SzymczakJ
Copy link
Contributor Author

Update: I'm testing out an option to replace SelectionList(from our Search/index.tsx component) with a FlashList. Writing a small POC to check. if it's even doable and what performance gains it might give us.

@SzymczakJ
Copy link
Contributor Author

I've done measurements with React Native dev tools profiler:
I've measured the total count of react commits that are caused by navigating for the first time to Reports page and I also summed the total render time(plus time spent on running useEffects and useLayoutEffects)
These are the results:
Old version: total commits ~35, total time: ~4000 ms
New version using flash list: total commits: ~23-24, total time ~1500ms
Selection list implements many functionalities(and a lot of them are not performant) that Reports page doesn't need and that's the main reason using Flash list helps so much.

I don't have all of the functionalities implemented yet(like selecting items with arrows), so the total time of the new approach will be higher, but I still think this will be tremendous upgrade in the Reports page performance. WDYT of this @luacmartins. Migrating this fully will take some time(probably the draft should be ready next week), so I need your green light to continue 😄

@luacmartins
Copy link
Contributor

That seems promising. Do you have a POC I can take a look at?

@SzymczakJ
Copy link
Contributor Author

Here's a small POC ⬆

@luacmartins
Copy link
Contributor

@SzymczakJ I just wanted to bring this other PR that's also aiming to improve the performance of Search

@melvin-bot melvin-bot bot added the Overdue label Mar 3, 2025
@SzymczakJ
Copy link
Contributor Author

Thanks for mentioning that. We're lucky and our PRs optimise other things, so both of them are valuable 😄. If you see any other performance fixes for Search, please let me know!
I'm also pretty close to having full functionality of SelectionList in my new FlashList.

@melvin-bot melvin-bot bot removed the Overdue label Mar 3, 2025
@luacmartins
Copy link
Contributor

Nice! Let's keep it up!

Copy link

melvin-bot bot commented Mar 6, 2025

@luacmartins @NicMendonca @ikevin127 @SzymczakJ 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!

@melvin-bot melvin-bot bot added the Overdue label Mar 6, 2025
@SzymczakJ
Copy link
Contributor Author

Update PR ready for review, here are some outcomes of it:

I made benchmarks between the old version of Reports screen and new version, I was measuring total time spent on calculating rerenders(and useEffects/useLayoutEffects) caused by entering Reports Page and also number of total commits. I made these benchmarks for iOS and Android platforms, as they the biggest performance problems and I was measuring it on emulator/simulator.

Old version:
Total time/number of commits spent on calculating rerenders:

Android:
First enter: ~3873 ms/ ~36 commits
Following enter: ~3521 ms / ~32 commits
iOS:
First enter: 4393 ms/ ~27 commits
Following enter: ~4556 ms / ~27 commits
New version:
Total time/number of commits spent on calculating rerenders:

Android:
First enter: ~2521 ms/ ~19 commits
Following enter: ~2112 ms / ~16 commits
iOS:
First enter: 2922 ms/ ~20 commits
Following enter: ~2772 ms / ~16 commits

This is not a complete fix for performance issue, but it's a big step for us and it should help with all the animations being slow, etc.

Copy link

melvin-bot bot commented Mar 26, 2025

⚠️ 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 Mar 26, 2025

⚠️ 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.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 27, 2025
@melvin-bot melvin-bot bot changed the title Follow up for "add search input to mobile search page issue" [Due for payment 2025-04-03] Follow up for "add search input to mobile search page issue" Mar 27, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 27, 2025
Copy link

melvin-bot bot commented Mar 27, 2025

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

Copy link

melvin-bot bot commented Mar 27, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.19-5 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-04-03. 🎊

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

  • @ikevin127 requires payment (Needs manual offer from BZ)
  • @SzymczakJ does not require payment (Contractor)

Copy link

melvin-bot bot commented Mar 27, 2025

@ikevin127 @NicMendonca @ikevin127 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]

@SzymczakJ
Copy link
Contributor Author

Since not every issue from this group issue wasn't completed yet I suggest to not close this task, but to put it on weekly. When we are done with Traditional Reports feature I will have some time to work on rest of these issues and finish them.
WDYT @luacmartins

@luacmartins
Copy link
Contributor

Sounds good to me

@luacmartins luacmartins changed the title [Due for payment 2025-04-03] Follow up for "add search input to mobile search page issue" Follow up for "add search input to mobile search page issue" Mar 27, 2025
@luacmartins luacmartins removed the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 27, 2025
@ikevin127
Copy link
Contributor

@NicMendonca No payment action required here for me, payment for #57191 (comment) will be handled in the regression issue where I'll get -50% of the bounty.

@NicMendonca
Copy link
Contributor

Not overdue

@melvin-bot melvin-bot bot removed the Overdue label Apr 7, 2025
@melvin-bot melvin-bot bot added the Overdue label Apr 16, 2025
@NicMendonca
Copy link
Contributor

Not overdue

@melvin-bot melvin-bot bot removed the Overdue label Apr 24, 2025
@melvin-bot melvin-bot bot added the Overdue label May 5, 2025
@luacmartins
Copy link
Contributor

I think everything here is done, right?

@melvin-bot melvin-bot bot removed the Overdue label May 5, 2025
@SzymczakJ
Copy link
Contributor Author

It seems so, let's just close this.

@luacmartins
Copy link
Contributor

Thanks for the work everyone!

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in #expensify-bugs May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

4 participants