Closed Traksewt closed 9 years ago
Not too much memory lost in this example per iteration, but with more tracks, and larger data range, this builds up over time.
Thanks, I'll take a look.
Given that I can't see an overlay: option in your config, I don't think OverlayFeatureSource is going to be relevant here. Suspect it may be the caching system in kspace.js.
Thanks for reporting this, and for pointing me at the Chrome heap profiler -- great tool!
I've identifier and fixed three major causes of leaking memory. Try http://www.biodalliance.org/dev/dalliance-all.js in your Fiddle to see the improvements. There are a few more loose ends in the event system which I'd like to check through before I cut a new release (should be by the end of the week).
great thanks Thomas, looking good!
There appears to be a memory leak when adding and removing tracks over time.
I reproduced the issue here by removing and readding a track over and over. http://jsfiddle.net/zwy6bwrn/5/
var bounceTiers = function () { browser.removeTier(datasources[0]); browser.addTier(datasources[0]); setTimeout(bounceTiers, 4000); } setTimeout(bounceTiers, 4000);
I then profiled it with google dev tools Profile->heap timelines, and it shows memory allocations building up over time (the blue lines shows what is held - grey is alloc'ed and released memory).![image](https://cloud.githubusercontent.com/assets/1939990/7110277/1d45fcf4-e1f2-11e4-9f46-4e5d2e9280f0.png)
possibly related to activityListeners not getting released inside OverlayFeatureSource.