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

[HOLD for payment 2024-07-05] [$250] [LOW] [Performance] Memoize the bottom tab component #43491

Closed
mountiny opened this issue Jun 11, 2024 · 10 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

@mountiny
Copy link
Contributor

mountiny commented Jun 11, 2024

Coming from Slack here

Problem

BottomTabBar re-renders a few times because of the parent component. It takes pretty much a time to update around 60ms on each re-render.

Solution

Use React.memo for the component to re-render only when necessary.
Before: 253ms (all rerenders, 5) / After: 105ms around 141% of improvement.
A commit is here. I am attaching screenshots with the legacy (the 1st) and updated (the 2nd) versions.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c88d87fb5aadb399
  • Upwork Job ID: 1800546469089470578
  • Last Price Increase: 2024-06-11
  • Automatic offers:
    • akinwale | Reviewer | 102689897
Issue OwnerCurrent Issue Owner: @jliexpensify
@mountiny mountiny added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 11, 2024
@mountiny mountiny self-assigned this Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

@mountiny mountiny changed the title [LOW] [Performance] [LOW] [Performance] Memoize the bottom tab component Jun 11, 2024
@mountiny
Copy link
Contributor Author

@rezkiy37 will handle it

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Jun 11, 2024
@melvin-bot melvin-bot bot changed the title [LOW] [Performance] Memoize the bottom tab component [$250] [LOW] [Performance] Memoize the bottom tab component Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01c88d87fb5aadb399

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@rezkiy37
Copy link
Contributor

Hi, I’m Michael (Mykhailo) from Callstack and I would like to work on this issue.

@rezkiy37 rezkiy37 mentioned this issue Jun 11, 2024
50 tasks
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 11, 2024
@rezkiy37
Copy link
Contributor

I've opened a PR - #43495.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jul 4, 2024
Copy link

melvin-bot bot commented Jul 4, 2024

This issue has not been updated in over 15 days. @akinwale, @jliexpensify, @mountiny, @rezkiy37 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Jul 4, 2024
@mountiny mountiny added Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review Monthly KSv2 labels Jul 4, 2024
@mountiny mountiny changed the title [$250] [LOW] [Performance] Memoize the bottom tab component [HOLD for payment 2024-07-05] [$250] [LOW] [Performance] Memoize the bottom tab component Jul 4, 2024
@mountiny
Copy link
Contributor Author

mountiny commented Jul 4, 2024

@jliexpensify this is ready for payment

$250 to @akinwale

No regression tests required

@jliexpensify
Copy link
Contributor

Cheers Vit, paid and job closed.

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
Development

No branches or pull requests

4 participants