-
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
perf: Reduce heavy operations in Request Money flow #39063
perf: Reduce heavy operations in Request Money flow #39063
Conversation
Seeking a C+ to address this immediately |
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.
@akinwale @TMisiukiewicz Could you update the test steps to test all the various money reqeust flows?
- Request money - manual, scan, distance
- Send money
- Split request
- Test the same from within DM chat, IOU report or workspace chat
- Test Split with workspace
src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
Outdated
Show resolved
Hide resolved
})( | ||
memo( | ||
MoneyTemporaryForRefactorRequestParticipantsSelector, | ||
(prevProps, nextProps) => |
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.
Are we sure we dont have to add more checks for this memo?
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.
Updated the memo with additional check for betas
. The only non-checked props now are
- callback functions
- Onyx prop:
reports
I think check for reports
would need a deep equality comparision, which might be a costy operation
MoneyTemporaryForRefactorRequestParticipantsSelector, | ||
(prevProps, nextProps) => | ||
_.isEqual(prevProps.participants, nextProps.participants) && | ||
prevProps.didScreenTransitionEnd === nextProps.didScreenTransitionEnd && |
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.
@TMisiukiewicz Is there a particular reason we're checking didScreenTransitionEnd
here, especially as the event never fires on Android?
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.
in this page, didScreenTransitionEnd
is used to prevent generating options unless the transition ended, to avoid doing heavy calculations while animation is happening. Without checking it, we'd infinitely get stuck on the skeleton
Reviewer Checklist
Screenshots/VideosAndroid: Native39063-android-native.mp4Android: mWeb Chrome39063-android-chrome.mp4iOS: Native39063-ios-native.mp4iOS: mWeb Safari39063-ios-safari.mp4MacOS: Chrome / Safari39063-web.mp4MacOS: Desktop39063-desktop.mp4 |
@TMisiukiewicz The search term "Workspac" doesn't return results, but this is happening on main as well. Is this something we want to fix here, @mountiny? Screen.Recording.2024-03-28.at.11.02.41.mp4 |
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.
LGTM.
@mountiny test steps are up to date now |
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.
Ok thank you, lets try this one!
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Tests were passing |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.58-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
Details
Fixed Issues
$ #39133
PROPOSAL:
Tests
Steps for Scan tab
Steps for Manual tab
Steps for Distance tab
Request money from workspace - test it in Scan/Manual/Distance tabs
Split - workspace - test it in Scan/Manual/Distance tabs
Split - users - test it in Scan/Manual/Distance tabs
Send money
Request from DM - test it in Scan/Manual/Distance tabs
Send money from DM - test it in Scan/Manual/Distance tabs
Request from workspace chat - test it in Scan/Manual/Distance tabs
Split bill from workspace chat - test it in Scan/Manual/Distance tabs
Offline tests
n/a
QA Steps
Steps for Scan tab
Steps for Manual tab
Steps for Distance tab
Request money from workspace - test it in Scan/Manual/Distance tabs
Split - workspace - test it in Scan/Manual/Distance tabs
Split - users - test it in Scan/Manual/Distance tabs
Send money
Request from DM - test it in Scan/Manual/Distance tabs
Send money from DM - test it in Scan/Manual/Distance tabs
Request from workspace chat - test it in Scan/Manual/Distance tabs
Split bill from workspace chat - test it in Scan/Manual/Distance tabs
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.mp4
iOS: mWeb Safari
IOS.WEB.mp4
MacOS: Chrome / Safari
WEB.mov
MacOS: Desktop
DESKTOP.mov