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-04-05] [$500] [Performance] Memoize SidebarLinksData to reduce the getOrderedReportIDs calls #38055

Closed
mountiny opened this issue Mar 11, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mountiny
Copy link
Contributor

mountiny commented Mar 11, 2024

Coming from the Callstack performance audit

From the hermes profile trace, we see that getOrderedReportIDs from Sidebarlinks takes about ~8 seconds and it happens in 3 occurrences. Which means we have getOrderedReportIDs being called for roughly 3 times. We can reduce it to 2 times only by adding memoization to Sidebarlinks . This reduces the app startup by ~2.5 seconds, which is a huge reduction.
Details for the implementation can be seen in the commit

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011e08e65659afcb69
  • Upwork Job ID: 1772400240247611392
  • Last Price Increase: 2024-03-25
Issue OwnerCurrent Issue Owner: @alexpensify
@mountiny mountiny added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 11, 2024
@mountiny mountiny self-assigned this Mar 11, 2024
Copy link

melvin-bot bot commented Mar 11, 2024

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

@mountiny
Copy link
Contributor Author

@rinej can you please comment here so I can assign you?

@rinej
Copy link
Contributor

rinej commented Mar 11, 2024

@mountiny sure

@mountiny
Copy link
Contributor Author

Thanks

@rinej
Copy link
Contributor

rinej commented Mar 12, 2024

Hello @mountiny, we decided to hold this off until we complete the remaining audit implementations because as of now, we are not yet sure whether we prefer the extra render without memo or increased rendering time with memo. We will evaluate this after all the audit action items are completed.

@mountiny mountiny added Monthly KSv2 and removed Daily KSv2 labels Mar 12, 2024
@mountiny
Copy link
Contributor Author

Thanks for an update

@alexpensify
Copy link
Contributor

Weekly Update: Going through an audit

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Monthly KSv2 labels Mar 25, 2024
@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Mar 25, 2024
@melvin-bot melvin-bot bot changed the title [Performance] Memoize SidebarLinksData to reduce the getOrderedReportIDs calls [$500] [Performance] Memoize SidebarLinksData to reduce the getOrderedReportIDs calls Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011e08e65659afcb69

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

melvin-bot bot commented Mar 25, 2024

Current assignee @c3024 is eligible for the External assigner, not assigning anyone new.

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 25, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 25, 2024
@alexpensify
Copy link
Contributor

Weekly Update: The PR is under review and making progress

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] [Performance] Memoize SidebarLinksData to reduce the getOrderedReportIDs calls [HOLD for payment 2024-04-05] [$500] [Performance] Memoize SidebarLinksData to reduce the getOrderedReportIDs calls Mar 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

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

Copy link

melvin-bot bot commented Mar 29, 2024

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

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

  • @rinej does not require payment (Contractor)
  • @c3024 requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Mar 29, 2024

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:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR:
  • [@c3024] 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:
  • [@c3024] 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:
  • [@c3024] Determine if we should create a regression test for this bug.
  • [@c3024] 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.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@mountiny
Copy link
Contributor Author

$500 to @c3024 only

@alexpensify
Copy link
Contributor

@c3024 - please apply to the job below and I can complete the payment process tomorrow:

https://www.upwork.com/jobs/~011e08e65659afcb69

Thanks!

Copy link

melvin-bot bot commented Apr 5, 2024

Payment Summary

Upwork Job

  • Contributor: @rinej is from an agency-contributor and not due payment
  • ROLE: @c3024 paid $(500) via Upwork (LINK)

BugZero Checklist (@alexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1772400240247611392/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@alexpensify
Copy link
Contributor

@c3024 - please accept in Upwork and I can complete the payment process. Thanks!

@c3024
Copy link
Contributor

c3024 commented Apr 5, 2024

@alexpensify accepted, thanks.

@alexpensify
Copy link
Contributor

Awesome, I've completed the payment process in Upwork.

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Development

No branches or pull requests

4 participants