-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 needless change events when creating a recordArrays #4947
Conversation
9f43ae2
to
7ed1c8a
Compare
…ent (rather then add them after, and broadcasting change events)
let modelsToAdd = []; | ||
let modelsToRemove = []; | ||
|
||
for (let i = 0; i < internalModels.length; i++) { |
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.
Does our new diffArray
method work here or is the data structure different?
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.
Interesting. I didn't think of that, I should try
@@ -161,6 +161,75 @@ test('recordArray.replace() throws error', function(assert) { | |||
}, Error('The result of a server query (on person) is immutable.'), 'throws error'); | |||
}); | |||
|
|||
test('only pass record array if explicitly in arity', function(assert) { |
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.
as written, this test name is hard to understand.
maybe 'pass record array to adapter.query based on arity'
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.
Will update
}); | ||
}); | ||
|
||
test('only pass record array if explicitly in arity', function(assert) { |
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.
as written, this test name is hard to understand.
maybe 'pass internalModels to createStore based on arity'
fun fun Error: The addon `ember-cli-htmlbars` requires the npm package `ember-cli` to be above 0.1.2, but you have undefined. |
Hmm. Can you double check and confirm we have [email protected]? I released a bad patch release earlier (1.3.1)... |
@rwjblue the issue did start with 1.3.2 but it appears to not be the fault of 1.3.2. Something either in the dep checker/ember-cli or blueprint-test helpers is causing the grief. I got a few other things to do this morning, then I'll debug further. |
@rwjblue TL;DR These tests https://github.com/emberjs/data/blob/master/node-tests/blueprints/transform-test.js#L45 create a project at I believe modifyPackages may not be working correctly.. |
8d86899
to
b4c7a48
Compare
258f158
to
dd08392
Compare
dd08392
to
410fa36
Compare
1d60d8e
to
a36a44f
Compare
finally green, although appveyor test are still hanging (unrelated to this PR, but I think we know whatsup in ember-cli land causing this...) |
When possible we should create new record arrays with there content, rather then creating them, and later adding there content. This prevents un-needed change events from firing. Some Older API's make this a tad tricky, but modern usages should not be penalized.