more marks (on the bench)

This commit is contained in:
Scott J. Miles
2014-10-16 17:57:35 -07:00
parent fcdbb3f0f3
commit 4aa978f4a9
7 changed files with 22 additions and 14 deletions
+6 -4
View File
@@ -25,9 +25,10 @@
},
registerFeatures: function(prototype) {
Base._features.forEach(function(f) {
var f$ = this._features;
for (var i=0, n=f$.length; i<n && (f=f$[i]); i++) {
f.register && f.register(prototype);
}, this);
}
},
createdCallback: function() {
@@ -43,9 +44,10 @@
},
initFeatures: function() {
Base._features.forEach(function(f) {
var f$ = this._features;
for (var i=0, n=f$.length; i<n && (f=f$[i]); i++) {
f.init && f.init.call(this);
}, this);
}
},
created: function() {
+3 -3
View File
@@ -15,7 +15,7 @@
document.querySelector('frame-tester').tests = [
'div.html',
'x-div-nada.html',
'x-div-raw.html',
'x-div-base-0-trivial.html',
'x-div-base-1-callbacks.html',
@@ -24,8 +24,8 @@
'x-div-polymer-0-trivial.html',
'x-div-trivial.html',
'x-div-default.html'
'x-div-neo-0-nofeatures.html',
'x-div-neo-1-default.html'
];
</script>
+2
View File
@@ -19,10 +19,12 @@
_features: [],
addFeature: function(feature) {
/*
this._features.push(feature);
extend(Base, feature);
delete Base.init;
delete Base.register;
*/
},
registerCallback: function() {
@@ -4,26 +4,31 @@
<link rel="import" href="../../neoprene/polymer.html">
<body>
<script>console.perf();</script>
<style>
x-div {
display: block;
border: 1px solid red;
padding: 1px;
margin: 1px;
}
</style>
<script>
Polymer({
name: 'x-div',
// not necessary, for just for clarity
features: Polymer.defaultFeatures
});
</script>
<body>
<script>console.perf();</script>
<script>
var frag = document.createDocumentFragment();
for (var i=0; i<1000; i++) {
+1 -2
View File
@@ -18,8 +18,7 @@
<script>
Polymer({
name: 'x-div',
features: Polymer.noFeatures
name: 'x-div'
});
</script>