-
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
Fix Search Page Slow Issue (CMD+K) - 2nd, 3rd solution #3980
Fix Search Page Slow Issue (CMD+K) - 2nd, 3rd solution #3980
Conversation
@Looxor I added a Work In Progress label until we get a demo account that we can test this PR with and so we don't merge this PR until we've fully tested yet. |
@nickmurray47 @Looxor I tested this with my account! Here's a summary of what I found. I used the dev tools performance profiler to test the |
Ok, I still think we should hold off on merging until we can definitely say that the PR does increase performance for the search page. @Looxor I also notice that this PR is pretty different from your original proposal of potentially cutting down on the number of renders. Can you include some details on why this change would improve performance? I'm wondering for testing if we can include some kind of performance metric to quantify this. I will also work on getting you your own testing account. Thoughts? |
@nickmurray47, Thank you for your attention. Regarding multiple rendering, I think that it's better to decrease multiple rendering, but as you mentioned before, it makes some regression issues. At the moment, I realized that it is related to too many components, and I tried to find other ways. Regarding didScreenTransitionEnd, I found a more effective way to display an ActivityIndicator. Thank you, |
@Looxor I also saw you posted in our open-source channel https://expensify.slack.com/archives/C01GTK53T8Q/p1625851107062100. Did you still need help mocking additional users? |
@nickmurray47 , |
@nickmurray47 , Yes, I still need them. |
Ok, @isagoico do you have a production QA account (expensifail) with a ton of chats on it that you could lend to an external contributor? |
@nickmurray47 Sure! You can try with |
Thank you @isagoico! |
@isagoico , Thank you so much. It works well. |
Regarding 3rd solution, I just pushed the 3rd solution. Looking up a component FullScreenLoadingIndicator, I noticed that there is a difference between "adjusting with height:100%" and "adjusting with {top: 0, bottom: 0}". But, I also agree on that "adjusting with {left: 0, right: 0, top: 0, bottom: 0}" is a better solution than "width/height: 100%". So, I left the original code and put some additional code for our CMD+K case. @timszot , @nickmurray47 , Thank you. |
Leaving my thoughts here. Looking at the changes, I am uncertain of any performance gain here. I would request you to pull Marc in for review as he is mostly looking into performance-related issues. |
I made 2 screenshots for you to show the difference. Untitled2.mp4Untitled3.mp4 |
It seems it more of a UI issue rather than a performance. Edit: But if it makes a noticeable impact on affected users who first raised this issue then 👍 |
Hi @isagoico,
|
@parasharrajat , |
Sorry, @Looxor I currently don't have the bandwidth to test it. |
No problem. @parasharrajat , Thank you for your time. |
@Looxor I did some more testing for you. Built from the proposed branch: These proposed changes do cut down on performance costs, but I don't see a noticeable improvement when using CMD+K on my production account. @marcaaron @nickmurray47 I would like your thoughts here as well. |
FWIW, it might be valuable to test locally on a production build. There is a lot of difference between dev and production JS. More info here -> https://reactjs.org/docs/optimizing-performance.html#use-the-production-build |
Sorry if this wasn't clear, all these tests were done with builds from dev, pointed to production. |
Interesting. That seems to suggest that we are experiencing some kind of local dev API lag, but this PR is not touching any APIs. Is the speed difference consistently reproducible? |
The actual time that it take to load the search and then populate the changes when you type in a value did not change from what I can tell. The only gains I saw was the rendering and scripting speeds. It was consistently faster. |
Sorry I'm not following why these changes would make anything go faster. Can someone summarize? |
@timszot Thanks for the writeup and testing. My understanding of why rendering would go faster is because instead of passing the It looks like the performance improvement is very marginal though so I don't think the PR is worth merging right now. |
What impact does this have on performance? This is the original proposal accepted... How did we end up with this PR ? |
I asked the same thing above. The original PR @Looxor submitted to address rendering caused several regressions and we ended up reverting it. |
@Looxor We are going to close this PR given the minimal performance improvement and how far off we got from the original proposal accepted. |
I want @nickmurray47 and @marcaaron to see this comment. |
Details
Fixed Issues
$ #3601
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
expensify-fix-result.mp4
iOS
Android
I have read the CLA Document and I hereby sign the CLA.