Skip to content
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

[PAY 23/02] [Performance] Make the Search Sidebar transition relatively smooth on slower devices #33596

Closed
mountiny opened this issue Dec 26, 2023 · 43 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Reviewing Has a PR in review

Comments

@mountiny
Copy link
Contributor

### Problem

coming from here

When user navigates back from Search Sidebar there’s a noticeable delay and lag in closing the Search Sidebar. It mainly arises from withNavigationFocus HOC as it re-renders the BaseOptionSelector tree including OptionsList . Adding a memo to OptionsList doesn’t help as it’s parent gets re-rendered due to the withNavigationFocus HOC.

Also, we notice that due to isFocused state value in ActionItemView the ReportActionsList re-renders which also adds the overhead to the rendering cycle as it recreates the instances of recordTimeToMeasureItemLayout and loadOlderChats which are passed as props to ReportActionsList .

Solution

We can remove the withNavigationFocus HOC and add navigation listeners(focus, blur) in BaseOptionSelector and memoize OptionsListto not re-render when state is set in it’s parent. We can avoid recreating instances of recordTimeToMeasureItemLayout and loadOlderChats by wrapping them in useCallbacks and memoizing ReportActionsList .

@mountiny mountiny added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 26, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Dec 26, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@mountiny
Copy link
Contributor Author

@hurali97 Could you comment on this one?

@mountiny
Copy link
Contributor Author

Pr is close to be merged

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 28, 2023
Copy link

melvin-bot bot commented Jan 1, 2024

@mountiny, @bfitzexpensify, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Jan 1, 2024

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

@bfitzexpensify bfitzexpensify added the Reviewing Has a PR in review label Jan 1, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jan 1, 2024
@hurali97
Copy link
Contributor

hurali97 commented Jan 2, 2024

Hey @mountiny 👋

@hurali97
Copy link
Contributor

hurali97 commented Jan 2, 2024

@hurali97 Could you comment on this one?

Is there something else should I comment ? or just the above is fine :D

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 2, 2024
@mountiny
Copy link
Contributor Author

mountiny commented Jan 2, 2024

Haha all good i just cannot assign external people who did not comment on the issue ;)

Copy link

melvin-bot bot commented Jan 10, 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 Jan 10, 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.

@mountiny
Copy link
Contributor Author

PR was reverted because there was couple of regressions with lists, we need to address them in a new PR

Copy link

melvin-bot bot commented Jan 10, 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.

@melvin-bot melvin-bot bot removed the Overdue label Jan 19, 2024
@situchan
Copy link
Contributor

This is not ready for payment yet. 2nd PR is in review

@adelekennedy
Copy link

huh - updating the title

@situchan
Copy link
Contributor

Please remove HOLD for payment from issue title

@adelekennedy adelekennedy changed the title [HOLD for payment 2024-01-22] [HOLD for payment 2024-01-18] [Performance] Make the Search Sidebar transition relatively smooth on slower devices [HOLD for payment 2024-01-22] [Performance] Make the Search Sidebar transition relatively smooth on slower devices Jan 19, 2024
@adelekennedy adelekennedy changed the title [HOLD for payment 2024-01-22] [Performance] Make the Search Sidebar transition relatively smooth on slower devices [Performance] Make the Search Sidebar transition relatively smooth on slower devices Jan 19, 2024
@adelekennedy adelekennedy removed the Awaiting Payment Auto-added when associated PR is deployed to production label Jan 19, 2024
@melvin-bot melvin-bot bot added the Overdue label Jan 22, 2024
@mountiny
Copy link
Contributor Author

Not overdue, pr is at works

@melvin-bot melvin-bot bot removed the Overdue label Jan 22, 2024
@mountiny mountiny added the Reviewing Has a PR in review label Jan 25, 2024
@mountiny
Copy link
Contributor Author

PR is at works

Copy link

melvin-bot bot commented Feb 2, 2024

@mountiny, @bfitzexpensify, @hurali97, @adelekennedy, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@situchan
Copy link
Contributor

situchan commented Feb 2, 2024

PR is in review

@muttmuure muttmuure moved this from CRITICAL to HIGH in [#whatsnext] #quality Feb 6, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

@mountiny, @bfitzexpensify, @hurali97, @adelekennedy, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@situchan
Copy link
Contributor

situchan commented Feb 9, 2024

still in review

@bfitzexpensify
Copy link
Contributor

Looks like the PR has hit prod - #34422.

I'm not sure the automation will work here, so updating the title manually.

As for payment - given the original PR was reverted due to regressions, it seems like the payout here would be $250.

Agree with that @mountiny?

@bfitzexpensify bfitzexpensify changed the title [Performance] Make the Search Sidebar transition relatively smooth on slower devices [PAY 23/02] [Performance] Make the Search Sidebar transition relatively smooth on slower devices Feb 16, 2024
@mountiny
Copy link
Contributor Author

I would say that this was a complex change to test and the regressions were very hard to catch, I would still payout $500 to @situchan as this was challenging task taking lots of time. @hurali97 is from agency.

@adelekennedy adelekennedy removed their assignment Feb 16, 2024
@bfitzexpensify
Copy link
Contributor

Cool, sounds good to me. Offer sent @situchan

@bfitzexpensify
Copy link
Contributor

Payment due Friday

@bfitzexpensify
Copy link
Contributor

Payment complete - @situchan can you please complete the BZ checklist? Will copy it into a new comment

@bfitzexpensify
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
  • [@situchan] 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:
  • [@situchan] A discussion in #expensify-bugs 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:
  • [@situchan] Determine if we should create a regression test for this bug.
  • [@situchan] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@bfitzexpensify ] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@situchan
Copy link
Contributor

This is performance improvement, not bug. BZ Checklist doesn't apply here.

@muttmuure
Copy link
Contributor

I think this can be closed

Copy link

melvin-bot bot commented Mar 1, 2024

@mountiny, @bfitzexpensify, @hurali97, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

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. Daily KSv2 Reviewing Has a PR in review
Projects
Development

No branches or pull requests

6 participants