-
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
Save queued updates to memory only #25614
Conversation
Merge freeze is over now so getting this into review. |
@sobitneupane @ One of you needs to 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] |
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.
Please pull main to reflect changes from #25455
Hmm @tgolen can you please look at my changes here and maybe help me determine if the linked issue is still a concern? I took a quick look at the recent changes and can't say that I am having an easy time following them. |
I think since we hit this: App/src/libs/Middleware/SaveResponseInOnyx.js Lines 48 to 50 in d012c54
Which should be fine for the But we also have this now: App/src/libs/actions/OnyxUpdates.ts Lines 84 to 87 in 191bda1
Which is saving the entire response, but I assume these updates will not be the huge ones I was concerned about storing for no reason so maybe they are fine. |
I think it should be fine. You're right that the big requests for This was the result of kind of a nasty work-around to avoid a cyclical dependency of the network modules and it was easiest to use Onyx as a temporary storage place for the updates. This could be refactored to hold the objects in memory and use a more "custom built" solution with a basic pub/sub interface. (I know that's short on details, so I can expand on that if you want) |
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.
Yeah, I think these changes should be fine.
@marcaaron please fix conflict |
@situchan Fixed can you please prioritize reviewing this? |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Safarimsafari.moviOSios.mov |
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! App works fine as normal
Let's just fix lint error
Remove unused import
Oof sorry I missed this @situchan thanks for your patience with me. |
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 comment was marked as resolved.
This comment was marked as resolved.
✋ 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/tgolen in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.77-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
Details
When trying to save the response of
OpenApp
we are saving a huge amount of data in one go during thequeuedOnyxUpdates
key setting. This will deprecate that key and make it so these queued updates only exist in memory.Fixed Issues
$ #25612
Relevant Slack thread: https://expensify.slack.com/archives/C035J5C9FAP/p1692141387843329
Tests
Basic testing of the app
Sign out / sign in
Verify API requests are succeeding and data is updating normally.
Verify that no errors appear in the JS console
Offline tests
N/A
QA Steps
No specific QA apart from regular regression tests is required.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android