Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI-Router is leaking memory? #318

Closed
jannis-seemann opened this issue Aug 13, 2013 · 4 comments
Closed

UI-Router is leaking memory? #318

jannis-seemann opened this issue Aug 13, 2013 · 4 comments

Comments

@jannis-seemann
Copy link

Could it be that ui-router is leaking memory? To reproduce, start chrome memory inspector, go to this site: http://angular-ui.github.io/ui-router/sample/#/contacts/123 and start clicking like crazy on the "Show random contact" button.

As you can see on the picture, garbage collection does work, however, some DOM elements seem to be still referenced, otherwise the local minimas wouldn't increase?

bildschirmfoto 2013-08-13 um 23 30 52

@adambabik
Copy link
Contributor

I got slightly different results, look at the screen shot below. At the end, I clicked Collect Garbage (trash bin icon). It almost went back to the initial value. The difference in DOM Nodes is 2 and in Event Listeners is 0.

screen shot 2013-08-16 at 09 16 13

I don't know exactly how GC works in Chrome, but it doesn't remove all unreferenced elements at once. This process is distributed over time and Chrome tries to do this in short periods so the UI freeze is not visible to the end user.

@timkindberg
Copy link
Contributor

Yeah I think that is natural (I'm not an expert, but @dreame4 explanation makes perfect sense). Plus I experience zero slow down after clicking at least a hundred times very quickly. A real memory leak would cause a big slow down.

@blowsie
Copy link

blowsie commented Oct 31, 2013

This is showing signs of leaking to me, even after hitting the GC button.

image

I understand this my not be a noticeable performance issue on your machine in Google chrome. but for a older machine running IE8, it becomes unusable and slow

@blowsie
Copy link

blowsie commented Oct 31, 2013

#545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants