-
Notifications
You must be signed in to change notification settings - Fork 47
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
Memory Leaks #3
Comments
Hi Matthiue, Thanks for bringing this up. For anyone else who's interested, here's some more info: http://stackoverflow.com/questions/10485582/what-is-the-proper-way-to-destroy-a-map-instance I can try something similar to your idea and let you know how it goes. |
Hi dylanfprice, Thanks for your reply, I worked on it and came up with a proof of concept : The rescue/reuse technique gives good results, tell me what you think and if I can help you for something. |
Cool thanks for doing that. I will have some time to add this in at the end of this week. |
That's awesome thanks a lot, I'm looking forward for your release 👍 |
I got your basic idea working and put it in a separate branch: https://github.com/dylanfprice/angular-gm/tree/memory-leak-fix It's not quite ready yet because I need to deal with a few issues like refreshing stale markers on the map. I went ahead and put a build of the memory-leak-fix branch up: http://dylanfprice.github.io/angular-gm/angular-gm-0.1.0-memory-leak-fix.js. Let me know if that solves your memory leak and I'll fix those remaining issues! |
Your are awesome, thank you ! I did an automated memory test, going through 300 views during 5 minutes, each view got a map, and here are the results:
Do not hesitate if I can do anything to help you. |
Hi,
I work on an one page application built on Angular and it uses a lot of maps.
My issue is that every time I instantiate a new map it will consume some memory that won't be released.
I measured the following with Chrome Web Inspector's Timeline: loading a map 100 times made the memory grow from 23MB to 160MB.
The issue is not directly related the angular-gm, but I don't see Google fixing that any time soon. The only fix I imagine is to instantiate a map and reuse it, it means that we need to be able to "rescue" it before Angular destroys the DOM, then "reset" and re-inject it later when another map is called.
Does anybody has that memory issue ?
The text was updated successfully, but these errors were encountered: