perf: fix significant memory consumption on web and desktop - #41898
danieldoglas merged 5 commits into
Conversation
…FlashList to render all its children and consume signficant memory
…s FlashList renders all its children when we switch from LHN to settings
|
@mountiny How I can access PROPOSAL: https://callstack-hq.slack.com/archives/C05LX9D6E07/p1715176526258709?thread_ts=1714771702.057689&cid=C05LX9D6E07 ? If it is a private room, please help to make a brief overview here. Thanks |
|
@danieldoglas Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-10.at.16.28.38.movAndroid: mWeb ChromeScreen.Recording.2024-05-10.at.16.10.43.moviOS: NativeScreen.Recording.2024-05-10.at.16.26.45.moviOS: mWeb SafariScreen.Recording.2024-05-10.at.16.04.17.movMacOS: Chrome / SafariScreen.Recording.2024-05-10.at.15.53.31.movMacOS: DesktopScreen.Recording.2024-05-10.at.15.58.40.mov |
| * Allow freezing the first screen and more in the stack only on | ||
| * web and desktop platforms. The reason is that in the case of | ||
| * LHN, we have FlashList rendering in the back while we are on | ||
| * Settings screen. |
There was a problem hiding this comment.
Is this assuming then that web/desktop is wide layout and native is narrow layout?
Its not a best practice and we should avoid that if that is the case as we are working on allowing wide layout on native ipad too and then this would not work that well. Not a blocker though
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.4.73-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.73-7 🚀
|
@thienlnam I will take a look at this tomorrow 👍 |
Details
This PR fixes the significant amount of memory consumption on web and desktop.
Before:
Part 1
before-1.mp4
Part 2
before-2.mp4
After:
Details
after.mp4
Fixed Issues
$ #41903
PROPOSAL: https://callstack-hq.slack.com/archives/C05LX9D6E07/p1715176526258709?thread_ts=1714771702.057689&cid=C05LX9D6E07
Tests
Testing Steps
Sign in to a heavy account on web or desktop and wait for the UI to load
Once the UI is visible, the app shouldn't freeze and shouldn't consume huge amount of memory
Switch to settings, the app shouldn't freeze and shouldn't consume huge amount of memory
If want to see how I tested it, more details can be found here
Verify that no errors appear in the JS console
Offline 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.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov