-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Move away from ArrayComputed/ReduceComputed #11513
Conversation
}); | ||
|
||
|
||
function commonSortTests() { | ||
<<<<<<< HEAD |
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.
Merge conflict?
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.
Ya, im just going through the work to re-integrate and fix this. Figured I would get it as a PR sooner rather then later so others saw this was being worked on.
84bc934
to
6d7b5a5
Compare
0ff9e64
to
9cd39a3
Compare
don't forget about #5150 |
21cd882
to
764d7f9
Compare
// This is a bit ugly | ||
var fullKey = dependentKey; | ||
if (/@each/.test(fullKey)) { | ||
dependentKey = fullKey.replace(/\.@each.*$/, ''); |
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.
doesn't this change the invalidation behavior of the macro in a very unexpected way?
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.
unsure, this snippet is somewhat inherited. Got a test case in mind?
Actually I believe this is correct.
given, the DK of [email protected]
we ultimately get collection
given, the DK of collection.@each.{attribute,other,other1}
we ultimately get collection
The DK here is actually used to grab the collection for subsequent array based mutation.
name is likely not the best.
This looks pretty great :-) |
90ddef6
to
a727222
Compare
👍 - LGTM (tested in a few apps)... @stefanpenner - Can you prefix with |
Hopefully addons are using ember-try :) |
a727222
to
b97fa12
Compare
b97fa12
to
0b4c1e7
Compare
@stefanpenner - The last rebase introduced a failure. |
Thanks. Ill check it out this evening |
0b4c1e7
to
956dbbf
Compare
@rwjblue green now. This is rather large, we can briefly mention it in the meeting today to get confirmation from the rest of the team. I suspect the motivation is not in controversy, but maybe some more want to get the chance to try it out. |
I think this might also cover #5558 |
@kategengler yup, it should totally fix that. |
…rjs#9462, emberjs#4919, emberjs#4231, emberjs#3706, emberjs#5596, emberjs#9485, emberjs#9492, emberjs#5319, emberjs#5268, emberjs#4831, emberjs#5558] Move away from AC/RC instead use the simpler naive enumerable methods, and rely on glimmers stable rendering for efficiency. For more complex scenarios, custom solutions should be used. @wagenet & @stefanpenner
f626c74
to
9c52115
Compare
Move away from ArrayComputed/ReduceComputed
👍 looks good - great job, @stefanpenner! |
A short explanation... ArrayComputed is no longer necessary because of Glimmer's diffing based rendering. Previously, ArrayComputed would meticulously track changes to arrays and keep metadata of splices (push, pop, shift, unshift, etc.) as they happened. With Glimmer's diffing, we no longer do any bookkeeping, instead all work is deferred until render and done in a single, very efficient, diffing pass. In order to do this efficiently, we use a key-based algorithm (pioneered by React). If you don't know about keys yet, that's fine. Ember has a default key implementation (relying on |
👍 for better performance with fewer LOC! |
Thanks for the explanation @mmun, I like it and helps me understand what's going on! |
Ah, how I've yearned for this day...! So good. |
#RenderEquality what a week! |
The red in this diff is incredible, so great! |
@stefanpenner great work my friend! |
@taras most of the additions are improved tests |
@wagenet & @stefanpenner
Fixes #11181
Fixes #10343
Fixes #9739
Fixes #9462
Fixes #4919
Fixes #4231
Fixes #3706
Fixes #5596
Fixes #9485
Fixes #9492
Fixes #5319
Fixes #5268
Fixes #4831
Fixes #5558