-
Notifications
You must be signed in to change notification settings - Fork 3k
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-29] [Performance] Chat Switch Improvement Part 1 #32793
Comments
Triggered auto assignment to @alexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
@mountiny Can you assign this to me ? |
Job added to Upwork: https://www.upwork.com/jobs/~01b6dca257065e9f96 |
Current assignee @allroundexperts is eligible for the Internal assigner, not assigning anyone new. |
This issue has not been updated in over 15 days. @alexpensify, @allroundexperts, @mountiny, @hurali97 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! |
Still working on this |
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. |
Payment Summary
BugZero Checklist (@alexpensify)
|
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. |
@allroundexperts is this warning an error or valid? |
This is valid. We have discovered a small UI issue. |
I see one of the PR is merged into production. I think the automation is off here, it looks like there is another related PR in the review process. I think we should hold off on payments until then but keep me posted @allroundexperts. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.55-3 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-29. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@allroundexperts - we are all set here and there are no other PRs to wait for - right? |
Looks like this work, and the below PR might be responsible for this Is this a bug that is already being considered and worked on? Or planned to be addressed in the future? |
@allroundexperts - can we get an update for @mallenexpensify? I need to confirm if we should handle in another GH and continue with the payment process here. Thanks! |
I think we can go ahead with payment on this one, the PR has been complicated and we already had second iteration on it. I have bumped the PR authors to look into that issue and review the proposals. |
With @mountiny's feedback, here is the payment summary:
Upwork Job: N/A Extra Notes regarding payment: There is regression which typically results in a decrease in pay. After reviewing this GH, these changes were complex. I'm suggesting leaving the bounty amount at the standard rate. |
@alexpensify , added
|
Noted! |
$500 approved for @allroundexperts |
Coming from this proposal from @hurali97
### Problem/Solution:
On Android, switching a chat takes noticeable time and doesn’t offer a good user experience. Benchmarking the main on a Mid-range android device gives us the following metrics:
Main: 7616, 7628, 7639, 7643, 7649 = 7635 ms
These durations are recorded on a debug build so we can assume that in production it’ll be shorter but that doesn’t guarantee good user experience, especially on low-end/ mid-range device. After investigating, the areas we find that this is one of the most complex piece to improve, so let’s start with what’s rather doable.
LHNOptionList leverages withCurrentReportID which adds to the rendering time and also re-rendering of the list when currentReportID is changed. The ideal solution is to put useCurrentReportID directly in the OptionRowLHNData since currentReportID is being used to evaluate isFocused prop for this component. We can save that process and do it where it’s needed to not render other parts of React tree.
When user taps on OptionRowLHNData the user navigates to the ReportScreen in that period a few unnecessary Onyx calls are being made:
First up is ComposeWithSuggestion where draft is set to false, even if it’s already set to false. Because in SilentCommentUpdater we call updateComment on mount.
Next, InteractionManager can be used to offload the work that happens before the user navigates to the ReportScreen. We can delay that work until the navigation is completed so that the user doesn’t feel that onPress is stuck.
Whole reportAction is being passed to ReportActionItem and it only uses some properties from it, so it makes sense to make it light weight and then pass it to ReportActionItem . The same concept is applied to ReportActionsList which now uses light weight report object.
Finally, there were handful unnecessary re-renders happening down the tree due to inline objects and functions 🚫
After all these improvements following is the results on debug build on the mid-range android device:
Android: 4221, 4137, 4102, 4096, 4160 = 4143.2 ms
So there’s about 3500 ms reduction in the total time, giving us around 4143.2 ms ( as compared to 7635 ms ), from when user taps on the OptionRowLHN and until the report is visible. There’s still room for improvement in this area and we will try to follow up on this with another PR.
As of now, as part of the investigation we also created the PR here, which will be ready for review after some cleanup and failing tests 🙏
P.S: some of the changes are already present in PR so they will be removed from this PR once the mentioned PR is merged.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @alexpensifyThe text was updated successfully, but these errors were encountered: