Suppose we have a model like this:
App.Somemodel = DS.Model.extend({
A:DS.attr('number'),
B:DS.attr('number'),
CP: function(){return this.get('A') + this.get('B');}.property('A','B')
})
My question is this :When is CP going to be re calculated ? - Right after A changed (before record.save() ) - After the record is saved ? - At the moment when this record is retrieved from store again ?
My second question is : Is the behavior because of the computed property itself ?
I am now struggling with some issues: when updating 1000+ records at the same time ,The efficiency get terrible .
I was trying to understand :Is it a good idea to define computed-property in the model ?