From: SourceForge.net <no...@so...> - 2009-11-01 22:59:42
|
Plugin Bugs item #2884464, was opened at 2009-10-23 16:32 Message generated for change (Comment added) made by ghosttrails You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=2884464&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andrew Reid (ghosttrails) Assigned to: Nobody/Anonymous (nobody) Summary: Project Viewer leaks memory when scrolling views Initial Comment: I'm using the project viewer in a project with several hundred source files. I've noticed that simply scrolling the project viewer lists up and down causes the max heap used by jEdit to grow. If do nothing but scroll the list up and down with the mouse for 2 minutes the heap grows from 80Mb to over 300Mb. My environment: jEdit 4.3pre17 Project Viewer 2.9.1 Fedora 11 x86 (32-bit) java version "1.6.0_16" (openjdk) ---------------------------------------------------------------------- >Comment By: Andrew Reid (ghosttrails) Date: 2009-11-02 09:59 Message: The heap dump from VisualVM can be downloaded from here: http://dl.getdropbox.com/u/130432/heapdump-1257114953469.hprof.gz (12Mb) SVN classes feature prominently in the dump. I made the max heap 48Mb this time so I didn't have to do as much scrolling. ---------------------------------------------------------------------- Comment By: Marcelo Vanzin (vanza) Date: 2009-10-30 15:27 Message: I really can't reproduce this (I have 1.6.0_14, both PV 2.9.1. and latest trunk). Please follow Kazutohi's instructions about using Visual VM (jvisualvm from the command line), take a heap dump when you think the VM has a lot of leaked objects, and send the file to my e-mail (va...@us...urceforge...). ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2009-10-29 08:43 Message: VisualVM, which is bundled in recent JDK, is very useful to investigate such a leaky behavior. Here is a regular steps to hunt a memory leak. - Launch VisualVM. - Connect to the running jEdit instance. - Repeat [Perform GC] until the [Used heap] become stable. - Take a [Heap Dump]. - Look for a suspicious instances. - Try [Show Nearest GC Root] for it. ---------------------------------------------------------------------- Comment By: Andrew Reid (ghosttrails) Date: 2009-10-26 13:53 Message: Just tried Sun jdk1.6.0_16 - same behavior ---------------------------------------------------------------------- Comment By: Andrew Reid (ghosttrails) Date: 2009-10-26 13:39 Message: I tried a test again with -Xmx64m. I did nothing after loading jEdit apart from switching to the "file" tab of ProjectViewer and scrolling the list up and down with the mouse over and over. What I saw was that the memory usage (as reported in the jEdit status) bar would rise for a bit and then fall as gc ran. However, the value it fell to would be a little larger each time. Eventually (this took about 5 minutes) memory usage stayed in the 58-61Mb range. At this point the performance of jEdit degraded markedly, presumably because of heap thrashing. I couldn't find a way to recover this memory (even unloading the ProjectViewer plugin didn't help). I'll try the Sun JDK as soon as I have a moment and report if it makes a difference. ---------------------------------------------------------------------- Comment By: Marcelo Vanzin (vanza) Date: 2009-10-23 17:55 Message: I see the same thing as Alan, also running Sun's version; the memory usage fluctuates, but it always goes back down eventually. Which indicates that garbage is generated, but no memory is leaked. (Very different things.) Try setting a -Xmx value for your session and see if the VM runs out of memory. ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2009-10-23 17:17 Message: I tried it on my system and it grew from 20mb to about 35 mb before the garbage collector grabbed it and brought it down to 20mb again. (windows XP). So it behaves much better than yours, I also observe the same behavior from the file system browser as the project viewer. What happens if you use a Sun JDK 1.6 instead of openjdk? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=2884464&group_id=588 |