Created
February 27, 2015 09:38
-
-
Save vitvad/6c58725f48c9c938c864 to your computer and use it in GitHub Desktop.
Profile bb collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var M = Backbone.Model.extend({}); | |
var C = Backbone.Collection.extend({model: M}); | |
var NUM = 100000; | |
var data = new Array(NUM); | |
data.forEach(function(item, i, list){ | |
list[i] = { | |
a: i, | |
b: "test"+i, | |
c: "test"+(NUM - i) | |
} | |
}); | |
console.profile("Backbone Collection " + NUM); | |
var cc = new C(data); | |
console.profileEnd("Backbone Collection " + NUM); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment