Community
Participate
Working Groups
The javaw process used around 34Mb when I started Eclipse. After opening a 14MB file from the resource perspective using the default text editor Eclipse used 108Mb. The memory was not freed when I closed the editor (even 10 minutes later). When opening the same document again the process used 109Mb. Repeating the process several times increased the consumption by about 1Mb each time. Opening another large text file increased the consumtion to 181Mb which also was not freed when closing the editor. Opening the same file again and the consumption was as 223Mb. After opening the same douments 3-4 times the memory usage did not increase any more. It's looks like the files are kept in separate buffers which are not emptied when the files are closed. This behaviour was observed using the F3 release.
Moving to Platform/UI for comment. Adding KH to CC since he has been doing performance work in this area.
We'd a discussion on the NG about this. It seems like all the memory the editor used is freed up when Eclipse is minimized and the maximised again. I guess this is not a bug, or just a small one. Since I'd expect Eclipse to free the memory the editor used as soon as the editor was closed. To verify this I opened a lot of big files until I got a Out of Memory Error, I then closed the same files and opened another big file. No error occured so I guess the GC freed up what was previously used.
Interesting. What kind of file were you opening? A .java file or a plain text file? Simply minimizing and restoring the window does not generate a garbage collect in the VM. The VM GCs if needed when trying to allocate new objects, and only issues an OutOfMemoryError if it fails to allocate the new object even after GCing. This looks like some strange interaction with the OS memory manager.
It was a plain text file (compilation log). After reading the latest posts on the newgroup it seems that I'm mistaken about the memory usage. I was looking at the physical memory measurment, not total *doh*. Which means that the "memory allocation change" I was seeing simply was Windows XP putting Eclipse in the swap file.
Closing PR. Please reopen if you still think there is a problem.