ReduceComputedProperty ignore invalidated property observers.#3364
Merged
wagenet merged 1 commit intoemberjs:masterfrom Sep 10, 2013
Merged
ReduceComputedProperty ignore invalidated property observers.#3364wagenet merged 1 commit intoemberjs:masterfrom
wagenet merged 1 commit intoemberjs:masterfrom
Conversation
Member
Author
|
cc @ssured in case you're curious about the fix to the bug you had identified. |
Member
Author
|
ah sorry @ssured; see the other PR i cc-d you on. This is an unrelated issue. |
Contributor
|
No problem. Its cool too see this |
Member
Author
|
Yeah, I'm really excited that people are already using it enough to identify these deficiencies so we can improve it quickly. ^_^ On a related note you can see #3365 for a new feature to work better with item controllers. There's another thing I need to do to make it easier to refer to multiple item properties in a bash-like syntax, but sadly no PR yet. |
Member
Contributor
…rvers. It can happen that several reduce computed properties depend on the same items, because the same items are shared between computed arrays. This will often be the case with filter/sort chains, for instance. When they depend on the same item properties it can happen that an item property change is registered for a downstream array, but a different item property observer invalidates the change. For example, changing the priority on an item may cause it to be resorted. This resorting will result in it being removed and reinserted into a downstream filtering. However, the original priority change also triggered an observer to update the filtering: an observer that has been invalidated by the changes resulting from its being resorted. - Properly invalidate such observers. - Also update indexes even more lazily, during `flushChanges`. Fix emberjs#3273.
wagenet
added a commit
that referenced
this pull request
Sep 10, 2013
ReduceComputedProperty ignore invalidated property observers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It can happen that several reduce computed properties depend on the same
items, because the same items are shared between computed arrays. This will
often be the case with filter/sort chains, for instance. When they depend on
the same item properties it can happen that an item property change is
registered for a downstream array, but a different item property observer
invalidates the change.
For example, changing the priority on an item may cause it to be resorted.
This resorting will result in it being removed and reinserted into a
downstream filtering. However, the original priority change also triggered
an observer to update the filtering: an observer that has been invalidated by
the changes resulting from its being resorted.
flushChanges.Fix #3273.