improve performance of getAllReportErrors#47780
Conversation
|
Taking over! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-02.at.3.43.45.AM.movAndroid: mWeb ChromeScreen.Recording.2024-09-02.at.3.43.17.AM.moviOS: NativeScreen.Recording.2024-09-02.at.3.42.33.AM.moviOS: mWeb SafariScreen.Recording.2024-09-02.at.3.42.14.AM.movMacOS: Chrome / SafariScreen.Recording.2024-09-02.at.3.38.37.AM.movMacOS: DesktopScreen.Recording.2024-09-02.at.3.40.00.AM.mov |
|
hey @allroundexperts , do you think you'll be able to jump back into this shortly? |
|
Yep, finishing today. |
|
I can verify that the functionality is intact. @OlimpiaZurek Can you guide me on how you're measuring the function call time? |
|
@allroundexperts I use the Chrome DevTools Performance tab to measure function call time ( on web) Here’s a quick guide:
The simplest way to measure function execution time is to use the You can also find guide how to profile release builds here. |
|
@allroundexperts please let us know if you'd need any assistance with testing this performance aspect :) |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #47691 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
flodnv
left a comment
There was a problem hiding this comment.
Can you please list the tests that you did for this PR?
No specific tests were done for this PR since it focuses on performance improvements rather than functional changes. Instead, I conducted performance profiling and attached before/after screenshots from trace analysis to demonstrate the impact of the changes. |
I understand, but I think all performance improvement should still validate with tests that they don't break functionality. |
6dea26f to
8230778
Compare
|
@flodnv I tested the changes from this PR, verifying error handling and flow when submitting expenses, in particular by:
|
|
Thank you! Please add these to the PR description and I can merge 😁 |
Added 😁 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |


This PR improves performance of
getAllReportErrors.In the latest trace coming from Jason thread
getAllReportErrorstook 340 ms. I tested this solution locally and managed to reduce the total execution time of this function from 77 ms to 21 ms. In Jason's case this should bring the execution time down to 100ms.Before:

After:

Details
Fixed Issues
$ #47691
PROPOSAL:
Tests
Enter an amount/Enter a merchant nameare displayedOffline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop