lundi 27 juin 2016

Backbone Debugger and Profiler

I'm trying to analyze web application by Backbone Debugger and Chrome Profiles.

I'm writing ES6 Marionette application and I try to figure what's going on when I delete objects. maybe I have some memory leaks.

I have single page web application, In the picture below are objects that probably being add to the heap due to imports of .js files that has:

var col = Backbone.Collection ({.....}).

While I change views and browse through the app I destroy objects that I'm done using: this.collection = new col().When I'm done using this.collection I do delete this.collection / this.collection = null. Heap snapshot remains the same 4 objects that I expect to see (all are coming from various imports).

enter image description here

yet on backbone debugger each time I see this:

enter image description here

It displays a different view of the collection exists in memory. instead of removing objects each time I do this.collection = new ..then delete this.collection it's adds more objects.

am I missing something?

I can see objects are active because when I use http://ift.tt/291Ep88
never mine if I delete object requests keep being sent.

not only this live collection also simple collection keeps adding:

var CustomerCollectionTest = Backbone.Collection.extend({
url: conf.getRestUrl + "/test/test/test/",
//url: "http://liork:8080/MonitoringDashboardServer/v1.0/customers/api/users/",

model: Model,

comparator: "customerName",

initialize: function (){
this.channelNavigation = Radio.channel ("navigation");

} });

am I missing something?

thanks.




Aucun commentaire:

Enregistrer un commentaire