Skip to content

Change FServerValues to just-in-time read from SyncTrees. #5183

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

Merged
merged 2 commits into from
Mar 30, 2020

Conversation

inlined
Copy link
Member

@inlined inlined commented Mar 24, 2020

Based on fix firebase/firebase-js-sdk#2499 to bug firebase/firebase-js-sdk#2487

Micro-benchmarking showed that N writes in succession led to N^2 performance when calcuating the resolved write tree for those writes (thankfully only at the subpath in this SDK). This change matches the optimization in JS that mitigated a 20% performance regression.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to determine that you authored the commits in this PR. Maybe you used a different email address in the git commits than was used to sign the CLA? If someone else authored these commits, then please add them to this pull request and have them confirm that they're okay with them being contributed to Google. If there are co-authors, make sure they're formatted properly.

In order to pass this check, please resolve this problem and then comment@googlebot I fixed it... If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

serverValues:
(NSDictionary *)serverValues;
+ (id<FNode>)resolveDeferredValueSnapshot:(id<FNode>)node
withSyncTree:(id<FNode>)existing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withExisting?

inlined added 2 commits March 30, 2020 09:55
Based on fix firebase/firebase-js-sdk#2499
to bug firebase/firebase-js-sdk#2487

Micro-benchmarking showed that N writes in succession led to N^2
performance when calcuating the resolved write tree for those
writes (thankfully only at the subpath in this SDK). This change
matches the optimization in JS that mitigated a 20% performance
regression.
@inlined inlined force-pushed the inlined.increment-optimization branch from 74f9210 to e0360a9 Compare March 30, 2020 16:55
@inlined inlined merged commit fffb2ee into increment-master Mar 30, 2020
inlined added a commit that referenced this pull request Apr 1, 2020
* Change FServerValues to just-in-time read from SyncTrees.

Based on fix firebase/firebase-js-sdk#2499
to bug firebase/firebase-js-sdk#2487

Micro-benchmarking showed that N writes in succession led to N^2
performance when calcuating the resolved write tree for those
writes (thankfully only at the subpath in this SDK). This change
matches the optimization in JS that mitigated a 20% performance
regression.

* Rename types to match JS sdk
@firebase firebase locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants