Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 27, 2017
1 parent 52ea600 commit c76ba5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
} else {
this._desugarBehaviors(); // abstract
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.beforeRegister) {
Expand All @@ -69,7 +69,7 @@
}
Polymer.telemetry.instanceCount++;
this.root = this;
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.created) {
Expand Down Expand Up @@ -99,7 +99,7 @@
// IFF `lazyRegister` is 'max'
if (settings.lazyRegister === 'max') {
proto._desugarBehaviors(); // abstract
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < proto.behaviors.length; i++) {
b = proto.behaviors[i];
if (b.beforeRegister) {
Expand All @@ -112,7 +112,7 @@
proto._finishRegisterFeatures();
}
// registration extension point
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var j=0, pb; j < proto.behaviors.length; j++) {
pb = proto.behaviors[j];
if (pb.registered) {
Expand All @@ -139,7 +139,7 @@
var self = this;
Polymer.RenderStatus.whenReady(function() {
self.isAttached = true;
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < self.behaviors.length; i++) {
b = self.behaviors[i];
if (b.attached) {
Expand All @@ -158,7 +158,7 @@
var self = this;
Polymer.RenderStatus.whenReady(function() {
self.isAttached = false;
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < self.behaviors.length; i++) {
b = self.behaviors[i];
if (b.detached) {
Expand All @@ -176,7 +176,7 @@
// TODO(sorvell): consider filtering out changes to host attributes
// note: this was barely measurable with 3 host attributes.
this._attributeChangedImpl(name); // abstract
// previously factor behavior call unrolled for perf
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.attributeChanged) {
Expand Down
1 change: 1 addition & 0 deletions src/mini/ready.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
// note: called localChildren -> host
_readySelf: function() {
// ready
// this code was in a function but is unrolled here for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.ready) {
Expand Down

0 comments on commit c76ba5b

Please sign in to comment.