Skip to content
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

[CLEANUP] PERF prevent duplicate recordArrayManager signals on push o… #5151

Conversation

stefanpenner
Copy link
Member

…f a new record

  • if the record is new, ensure only 1 recordWasLoaded is called (after setup)
  • if the record is existing, ensure only 1 recordDidChange is called (after setup)
  • decouple InternalModel slightly more from recordArrayManager
  • remove now defunct code

…f a new record

* if the record is new, ensure only 1 recordWasLoaded is called (after setup)
* if the record is existing, ensure only 1 recordDidChange is called (after setup)
* decouple InternalModel slightly more from recordArrayManager
* remove now defunct code
internalModel.setupData(data);

this.recordArrayManager.recordDidChange(internalModel);
if (isUpdate) {
this.recordArrayManager.recordDidChange(internalModel);
Copy link
Member Author

Choose a reason for hiding this comment

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

previously, when pushing a new record this was firing, even though a new record has no updates. It merely starts off its existence in that state...

This resulted in every new record going through the record-array manager twice on initial push...

@stefanpenner
Copy link
Member Author

stefanpenner commented Aug 25, 2017

If someone has issues with this due to a potential feature related issue, please provide a failing test, that way we can codify if we are missing something.

Copy link
Member

@hjdivad hjdivad left a comment

Choose a reason for hiding this comment

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

LGTM

@stefanpenner stefanpenner merged commit 7a7bafa into master Aug 30, 2017
@stefanpenner stefanpenner deleted the reduce-duplicate-signals-to-record-array-manager-on-record-push branch August 30, 2017 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants