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

Avoid unnecessarily notifying observers when changes and errors are cleared. #32

Merged
merged 1 commit into from May 18, 2016

Conversation

Projects
None yet
2 participants
@burrows
Copy link
Member

burrows commented May 17, 2016

Currently observers of the ownChanges and ownErrors props are notified when they are cleared, even if there is nothing there to clear. This PR updates that logic to only notify observers when there is something there to be cleared.

@burrows

This comment has been minimized.

Copy link
Member

burrows commented May 17, 2016

@peterwmwong @alexraginskiy Here is another minor performance optimization for you guys to look at.

@alexraginskiy

This comment has been minimized.

Copy link
Contributor

alexraginskiy commented May 17, 2016

LGTM. Since we use _clearChanges and _clearErrors in several scenarios, do you it makes sense to name them as public methods?

@burrows

This comment has been minimized.

Copy link
Member

burrows commented May 18, 2016

@alexraginskiy Yes, that should be fixed, but I think its unrelated to this PR.

@burrows burrows merged commit 1001787 into master May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment