Skip to content

Instantly share code, notes, and snippets.

@demesne
Created February 10, 2014 07:12
Show Gist options
  • Select an option

  • Save demesne/8911630 to your computer and use it in GitHub Desktop.

Select an option

Save demesne/8911630 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Ember Performance</title>
</head>
<body>
<script type="text/x-handlebars">
<h2>Hello {{mytext}}!</h2>
<br />
{{input value=mytext}}
<button {{action render_vc}}>Render</button>
<br/>
<span>
{{#each item in controller}}
{{item.number}},
{{/each}}
</span>
</script>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.3.1/ember.min.js"></script>
</body>
</html>
App = Ember.Application.create();
App.Router.map(function() {
this.route('updateTest', '/');
});
App.ApplicationRoute = Ember.Route.extend({
model: function() {
return [
];
}
});
App.ApplicationController = Ember.ArrayController.extend({
actions:{
render_vc: function(){
for(var i=0; i<100000; i++){
// console.log(this);
this.get('model').pushObject({number:i});
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment