-
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
perf: fix significant memory consumption on web and desktop #41898
perf: fix significant memory consumption on web and desktop #41898
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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