-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-03-19] [$250] [Performance] optimise sorting for nonArchivedReports #37899
Comments
Job added to Upwork: https://www.upwork.com/jobs/~010fd35a8396dac225 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
Triggered auto assignment to @greg-schroeder ( |
Upwork job price has been updated to $250 |
How do we know only dates are required for sorted in this case. |
📣 @webbdays! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Optimise sorting for What is the root cause of that problem?N/A as this is the new feature to optimise sorting for What changes do you think we should make in order to solve the problem?I have went through the code.
What alternative solutions did you explore?So to handle the case where dates is enough to compare, here we can use ternary operator when returning the comparator. Like this Thanks for reading. |
ProposalPlease re-state the problem that we are trying to solve in this issue.optimize sorting for nonArchivedReports What is the root cause of that problem?
Lines 166 to 168 in f550e84
What changes do you think we should make in order to solve the problem?Check nonArchivedReports.sort((a, b) => {
const compareDates =
a?.lastVisibleActionCreated && b?.lastVisibleActionCreated
? compareStringDates(
b.lastVisibleActionCreated,
a.lastVisibleActionCreated
)
: 0;
//check if here
if (compareDates) {
return compareDates;
}
const compareDisplayNames =
a?.displayName && b?.displayName
? a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase())
: 0;
return compareDisplayNames; What alternative solutions did you explore? (Optional) |
Merged |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-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-03-19. 🎊 |
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO. |
no further steps required here |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
PR is a part of Callstack performance audit of the app
In this PR, hot path of sorting
nonArchivedReports
inside ofgetOrderedReportIDs
was optimised to return early when dates are sufficient to be used as a comparison criterion.Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: