Page 1 of 1
How to alter document caching behavior?
Posted: Sun Jun 03, 2007 7:04 pm
by gregory
Hi. I'm relativly new to oxygen and I have a question about memory management. I notice that when documents are closed, they appear to still be cached in memory. This leads to oxygen using up a large amount of memory on my machine even after I've closed all files.
The only way I've found to free up that memory (for other applications) is to close oxygen and reopen it, which is rather cumbersome and requires a lot of processor work. Is there a way to tell Oxygen not to cache documents that have been closed?
Note: I don't just want to reduce the amount of memory available to the program--I want to be able to open large files, but then I want to be able to free up that memory again when I close them.
Any suggestions would be appreciated.
Gregory
Posted: Mon Jun 04, 2007 5:44 pm
by sorin_ristache
Hello,
I tried to reproduce the memory problem with a profiler by opening and closing a very large file but the allocated memory decreases dramatically after closing the file. How did you see that the memory remains occupied by oXygen?
Regards,
Sorin
Posted: Mon Jun 04, 2007 5:55 pm
by gregory
Hi,
Thanks for your response. I simply used the Windows Task Manager to see how much memory was allocated to the oxygen process. Is that likely to be misleading?
According to the Task Manager, every time I open a new file, the memory goes up, and when they are closed, it doesn't decrease until I close the program, even if I leave it alone for a while.
Gregory
Posted: Mon Jun 04, 2007 8:50 pm
by george
Hi,
oXygen is a Java application and the memory management is performed automatically by a "garbage collector". The application has a maximum memory and each time when it needs some memory if there is enough free memory then it is allocated, if there is not enough free memory then the "garbage collector" starts and releases the memory that is not really used by the application. So, for a Java application it is very likely to see in task manager the memory close to the maximum memory allocated for that application but that does not mean that all that memory is actually used.
Best Regards,
George
Posted: Tue Jun 05, 2007 4:49 pm
by gregory
Thanks again for your reply. I'm a bit confused here. I'm no Windows guru, certainly, but Windows defines the "memory usage" statistic as "the number of pages currently resident in memory". As I write, oxygen is taking up (with no files open) the following, according to the Task Manager:
Mem Usage: 320 MB
Peak Mem Usage: 238 MB
Virtual Mem Size: 356 MB
The swap file grew to be huge while I opened some big files, and is *still* huge. I'm not sure if the numbers above mean that oxygen is taking 356 MB of RAM + swap file or if it's taking 320 MB of RAM *and* 356 MB of swap file (I sure hope not). But here's the point: I don't have any files open, so it's inappropriate for these resources to be tied up like that. Don't you agree?
Thanks,
Gregory