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

[BUGFIX canary] Trust Ember.set #12247

Merged
merged 1 commit into from
Sep 1, 2015
Merged

Commits on Aug 30, 2015

  1. [BUGFIX canary] Trust Ember.set

    This change eliminates unnecessary dirtying of proxy streams when the
    source object is an Ember.Object. It results in significant re-render
    performance improvement in certain scenarios, especially when people are
    iterating over lists of Ember.Objects to render components with
    expensive lifecycle hooks.
    
    We already have a longstanding convention that people need to use `set`
    to mutate Ember.Objects if they expect any observability, and as long as
    people are using `set`, interior mutability will be captured by other
    observers further downstream.
    
    The same is not necessarily true for POJOs. We would like to allow
    something conceptually like:
    
        myComponent.set('thing', aPojo);
        aPojo.deep.inside.here = 'newValue';
        myComponent.notifyPropertyChange('thing');
    
    to work correctly, such that the deep mutation gets noticed. Which is
    why this change treats POJOs and Ember.Object's differently.
    ef4 committed Aug 30, 2015
    Configuration menu
    Copy the full SHA
    a2fc1ee View commit details
    Browse the repository at this point in the history