[Bugfix beta] dramatically improve performance of eachComputedProperty #5212
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.
ember-data relies heavily on eachComputedProperty. Recently it has grown to rely on eachComputedProperty much more. This was due to state bleed introduced by storing this state on the model constructor. Those issues can be fixed, but will be much more involved and since the list of computedProperties rarely (if ever changes) it should likely just be cached on consumption and rely on proper invalidation.
Invalidation occurs if additional properties are added via defineProperty or reopen. If an ancestor is given additional computed properties or reopened after the first eachComputedProperty invocation,it will not cause an invalidation. This last caveat is actually true throughout embers object model and as such it should be considered extremely dubious to reopen objects after the first instance has been created.
Conflicts:
packages/ember-runtime/lib/system/core_object.js