Skip to content

Don't look up TargetId in notifyLocalViewChanges #1065

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 5 commits into from
Jul 30, 2018

Conversation

schmidt-sebastian
Copy link
Contributor

This PR removes a QueryData read from notifyLocalViewChanges. This read happened for every target update and was merely used to look up the target ID.

Copy link
Contributor

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

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

LGTM with nits.

return PersistencePromise.waitFor(promises);
});
notifyLocalViewChanges(viewChanges: LocalViewChanges[]): void {
for (const view of viewChanges) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you've rewritten most of this loop, maybe go ahead and rename 'view' to 'viewChange' for sanity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -26,11 +27,15 @@ import { documentKeySet, DocumentKeySet } from '../model/collections';
export class LocalViewChanges {
constructor(
readonly query: Query,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think query is unused now. Remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, done.

@schmidt-sebastian schmidt-sebastian merged commit 6abb55f into master Jul 30, 2018
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-noquerylookup branch August 3, 2018 17:15
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants