revert host attributes ordering change optimization as it was not worth the trouble (barely measurable and more cumbersome impl).

This commit is contained in:
Steven Orvell 2015-11-04 17:09:17 -08:00
parent 11606ba9db
commit f9894a09e9
3 changed files with 10 additions and 8 deletions

View File

@ -80,10 +80,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._marshalInstanceEffects();
// acquire instance behaviors
this._marshalBehaviors();
// acquire initial instance attribute values
this._marshalAttributes();
/*
TODO(sorvell): It's *slightly() more efficient to marshal attributes prior
to installing hostAttributes, but then hostAttributes must be separately
funneled to configure, which is cumbersome.
Since this delta seems hard to measure we will not bother atm.
*/
// install host attributes
this._marshalHostAttributes();
// acquire initial instance attribute values
this._marshalAttributes();
// top-down initial distribution, configuration, & ready callback
this._tryReady();
},

View File

@ -59,6 +59,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// reserved for canonical behavior
attributeChangedCallback: function(name, oldValue, newValue) {
// TODO(sorvell): consider filtering out changes to host attributes
// note: this was barely measurable with 3 host attributes.
this._attributeChangedImpl(name); // abstract
this._doBehavior('attributeChanged', [name, oldValue, newValue]); // abstract
},

View File

@ -86,12 +86,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
if (!this.hasAttribute(n) && (n !== 'class')) {
var v = attr$[n];
this.serializeValueToAttribute(v, n, this);
// TODO(sorvell): this should not be in micro layer.
// if necessary, add this value to configuration...
if (!this._clientsReadied && this._propertyInfo[n] &&
(this._config[n] === undefined)) {
this._configValue(n, v);
}
}
}
},