-
Notifications
You must be signed in to change notification settings - Fork 172
memory leaks #22
Comments
I think this is happening because the editor is never destroyed. I haven't done a lot of testing, but this should fix it:
|
So true. No need PR I'm adding it right now... |
I'm still getting a small memory leak with acee.destroy. I think this is due to ajaxorg/ace#344. |
Yeah me too here |
@douglasduteil So I did a bit of testing with the Firefox debug build (29.0a1 (2013-12-12)) I'm been using. The testing procedure I followed is: Then click on the create/destroy button 1000 times using xdotool, which should result in the editor being created and then destroyed 500 times. I then clicked the Minimize memory usage button and Measure and Save... again, producing this file Then click on the create/destroy button 2000 more times using xdotool. I then clicked the Minimize memory usage button and Measure and Save... again, producing this file Using Firefox's about:memory Load and Diff button, I was not able to find any noteworthy difference between file 2 and file 3. Edit: I was not able to get the same kind of dump from Chrome, but I did the same kind of rapid clicking test with xdotool using the latest unstable of Chrome and I did not notice a memory leak. I even tested creating and deleting about 12 editors all at once to speed it up. The memory used seems to relate more to the total number of editors open at one time, not the number of times they were created and destroyed. After the clicking stopped, I left the tab and the Task Manager open, and the memory usage slowly dropped back to the same point the test with only one editor open had, at around 150M Private Memory, 54M (26M live) JavaScript memory. |
@ricochet1k 👍 that's some very precision data there ! Thanks :) |
Browsers don't typically offer heap size data to the running website, so something like that is going to be hard to make. It would probably have to involve a plugin/extension of some kind. I haven't been able to find any that do it. |
Ace will leak when the directive is removed by angular.
I had the editor in a tab-content controlled by ng-switch, the results were bad.
My solution for now is just using my own tab implementation that does not delete and recreate the elements like ng-switch does.
The text was updated successfully, but these errors were encountered: