ui-router-extras icon indicating copy to clipboard operation
ui-router-extras copied to clipboard

possibility of memory leak?

Open mg1075 opened this issue 9 years ago • 3 comments

Are there significant dangers of memory leaks with ui-router-extras sticky states?

I had my browser open for a while on some of the examples pages, and after a while, the pages appeared to be hogging on memory usage.

Then I tried implementing sticky states in my application as well, and the memory usage seems to just keep ramping up. Kind of a show-stopper.

Looks like this is not the first time the issue has been brought up. https://github.com/christopherthielen/ui-router-extras/issues/117

mg1075 avatar Sep 10 '15 07:09 mg1075

I don't think sticky states leaks memory. Each sticky state remains active, so you have the overhead of additional views, and those views DOM+events+scope, but I don't think there's anything specific to sticky states that would leak memory (as opposed to, let's say having directives and ng-show/ng-hide managing them)

If you can create an example demonstrating the memory leak I'd be happy to take a look.

christopherthielen avatar Oct 03 '15 16:10 christopherthielen

I think the problem may be the statevis D3 based State visualization that is used. I noticed the same problem about memory ramping up on the demo and on my app where i'm using ui-router (and statevis); After remove statevis everything became normal.

borntorun avatar Oct 04 '15 09:10 borntorun

That's certainly possible. Statevis is definitely not mature enough for "production", only for demos.

christopherthielen avatar Oct 04 '15 15:10 christopherthielen