Peformance when creating lots of objects


So I’m writing my own data layer to use until ember data meets our performance requirements. So far its working much better, but there is still a noticeable freeze as its processing the data from the xhr requests. Here is what my findAll method looks like:

	findAll: function() {
		var url = this.url,
			newObjects = [],
			root = this.root + 's',
			self = this;

		newObjects.set('isLoaded', false);

		if(this.plural) {
			root = this.plural;

		$.getJSON(url).then(function(response) {
			var temp  = [];
			response[root].forEach(function(data) {
			});, function () {
				newObjects.set('isLoaded', true);

		return newObjects;

Is there anything I can do better in this code to get more performance out of it?


Could you create a sample app that demonstrates the freeze? I can’t make any suggestions until I can run this through a profiler.


Thanks @nerdyworm. I’ll try to get an example up as quick as I can, likely not till over the weekend though.