-
Notifications
You must be signed in to change notification settings - Fork 74
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
Remove null values from cache to improve Onyx read speed #554
Remove null values from cache to improve Onyx read speed #554
Conversation
Requesting a review from myself so this doesn't get lost, but planning to let Janic review first. |
This PR seems to be the fix for a regression in Expensify/App#42057, which was reverted in Expensify/App#42725 @neil-marcellini @janicduplessis i'm gonna prioritize this PR right now so we can hopefully merge this today. I'll let you guys know when i'm done with the implementation so you can review cc @mountiny |
@neil-marcellini @mountiny @janicduplessis this PR is now ready for review! Once we merged this, we can review, QA and merge Expensify/App#42772 |
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.
The changes and tets look good to me. Are there any manual tests we could do in App to make sure this doesn't break anything?
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.
@chrispader Thanks for the great effort, I have left couple small comments, otherwise looking good
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
@mountiny addressed all your comments and improved a few other parts of the implementation |
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.
Thank you very much, lets now work on the onyx bump and we can create a build which we will ask QA to test over the weekend
🚀Published to npm in v2.0.43 |
Coming from this issue Expensify/App#42529. @chrispader I just need to confirm if this PR fix the above issue because its title indicates it is for improve performance |
@ahmedGaber93 this PR is also supposed to remove |
Coming from this issue Expensify/App#42529. E/App still receive null values in |
I couldn't reproduce this myself, but i suppose this stems from old data (with We only remove @ahmedGaber93 could you link me to the exact repro steps? the ones from the issue description don't give me this problem |
@ahmedGaber93 You mean exact |
@mountiny @neil-marcellini
Details
Removes
null
values from OnyxCache (reads) and therefore removes unnecessary calls toremoveNestedNullValues
on read.This PR adds a
nullishStorageKeys
Set toOnyxCache
where a key can be added in order for the key to representnull
/"not set" in cache. This change let's us keep existing performance and loading state improvements that @janicduplessis implemented in #401.This PR also adds some general code quality improvements around using the cache and handling reads and writes to Onyx.
Recently
IDBKeyvalProvider
hasn't been identical in it's behavior toSQLiteStorageProvider
. Therefore, i added some extra logic tosetItem
,multiSet
andmultiMerge
, to check for null values and handle those in the storage layer.Related Issues
#553
Expensify/App#42654
Automated Tests
Manual Tests
Author Checklist
### Related Issues
section aboveTests
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop