-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Improve OD ND time #78773
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
base: main
Are you sure you want to change the base?
Improve OD ND time #78773
Conversation
|
@thesahindia 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Are you sure this is |
|
NAB: Also this is not Sentry related change, so I'd remove |
|
reviewing.. |
mountiny
left a comment
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.
Looks good but I would definitely encourage adding test steps to this in case there are some race conditions or some other issues
ok I added QA steps |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
yes its added |
sure fixed |
| function prepareHybridAppAfterTransitionToNewDot(hybridApp: HybridApp) { | ||
| if (hybridApp?.useNewDotSignInPage) { | ||
| return Onyx.merge(ONYXKEYS.HYBRID_APP, { | ||
| return Onyx.set(ONYXKEYS.HYBRID_APP, { |
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.
by using Onyx.set instead of Onyx.merge in side prepareHybridAppAfterTransitionToNewDot. (the merge is actually replacing the whole value of the key)
Nice work on the parallelization .. the perf win there makes sense. One question about switching Onyx.merge → Onyx.set for ONYXKEYS.HYBRID_APP: merge doesn’t generally replace the whole object. it preserves existing fields not present in the incoming payload. With set, we overwrite the entire key and could drop any HYBRID_APP fields that were previously set on the NewDot side but aren’t included in hybridAppSettings.hybridApp. Is the intent here to always fully override HYBRID_APP during the OD→ND transition? i am asking because performance wise merge and set should be nearly the same in this case .. so i wouldnt probably change it .. but would love to hear your thoughts
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.
This is my concern too with this change
|
Through my testing, I’m seeing a good improvement in duration in my case as well. I clicked the button three times with the new build, and it gives a better result than the two older clicks with an older build. Screen.Recording.2026-01-02.at.16.47.37.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-02.at.16.47.37.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
abzokhattab
left a comment
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.
overall it looks good to me ... i just left one comment here .. let me know what u think https://github.com/Expensify/App/pull/78773/changes#r2657903072
Explanation of Change
Fixed Issues
$#77172
PROPOSAL: this PR Improves time takes to get from oldDot to newDot via
Try New Expensifybutton.It does it by executing
prepareHybridAppAfterTransitionToNewDotin parallel with other async actions and by usingOnyx.setinstead ofOnyx.mergein sideprepareHybridAppAfterTransitionToNewDot. (the merge is actually replacing the whole value of the key)It improves in our big perf account in around 1.5-2 seconds the time, via local inspections and sentry.
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
try is from your main branch / build that not including this change
ManualOdNdTransitionand look for the duration, you can use for example this linkNow do the same process again with the build that includes this pr, and compare between the durations.
Expected Result:
The span duration need to be faster
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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