Skip to content

Instantly share code, notes, and snippets.

@Sinled
Created September 22, 2016 10:04
Show Gist options
  • Save Sinled/5c5749997447ae0cc7aa289e53f4d8e5 to your computer and use it in GitHub Desktop.
Save Sinled/5c5749997447ae0cc7aa289e53f4d8e5 to your computer and use it in GitHub Desktop.
test-perf
import Ember from 'ember';
const Item = Ember.Object.extend({
id: 0
});
export default Ember.Controller.extend({
name: "Вася",
list: [],
actions: {
render() {
var list = this.get("list");
for (var i=1; i< 10000; i++) {
list.addObject(Item.create({
id: i
}));
}
}
}
});
{{name}}<br>
{{input type="text" value=name}}
<br>
<button {{action "render"}}>render</button>
<ul>
{{#each list as |item|}}
<li>{{item.id}}</li>
{{/each}}
</ul>
{{outlet}}
{
"version": "0.10.5",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment