odd garbage collection behaviour
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
odd garbage collection behaviour
I have read the forum submissions related to memory management and out of memory issues.
As an asside I noticed some broken links to articles about working with large files.
I changed the startup memory allocation to 1000m and was opening an 80 meg xml document.
With the adjusted startup allocation I can successfully load the file and work with it.
My concern is that if I close that file then try to reopen it, I get an out of memory error.
I thought maybe it was not freeing up the memory properly.
The odd thing is that if I copy that file to a different name and then load it, it is successful.
WTF? Is it doing some kind of a compare to the previous version of itself or something.
I am guessing it is some kind of java garbage collection thing but it does not seem to be very functional.
Is this problem only relate to the last file loaded when it is very large or would I have the same problem if I attempted to open and close a 10 Meg file 10 times?
As an asside I noticed some broken links to articles about working with large files.
I changed the startup memory allocation to 1000m and was opening an 80 meg xml document.
With the adjusted startup allocation I can successfully load the file and work with it.
My concern is that if I close that file then try to reopen it, I get an out of memory error.
I thought maybe it was not freeing up the memory properly.
The odd thing is that if I copy that file to a different name and then load it, it is successful.
WTF? Is it doing some kind of a compare to the previous version of itself or something.
I am guessing it is some kind of java garbage collection thing but it does not seem to be very functional.
Is this problem only relate to the last file loaded when it is very large or would I have the same problem if I attempted to open and close a 10 Meg file 10 times?
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: odd garbage collection behaviour
Hi,
Thank you for reporting this.
Can you give us more details, like what Java Virtual Machine are you using with Oxygen?
You can check that out by going to "Help->About" and check the java.version entry in the System Properties tab.
Also in the Copyright tab you have an entry with "JVM memory used".
Also, clicking that label will issue a garbage collect request to the garbage collector.
We have automated tests which open large XML files over and over again and if there would be a memory leak with multiple files it should be noticed there.
I made some tests and indeed in Java 1.6 there seems to be a problem with the garbage collector not releasing the memory.
If you are running Oxygen with Java 1.6 can you try running Oxygen with Java 1.5? Do you see any difference?
You can see this link about how to change the Java version for Oxygen:
http://www.oxygenxml.com/doc/ug-oxygen/ ... tions.html
Also a test you could do is that after you close the huge file to open a small file, close it, and then try opening the large file again.
Please, also tell us what editing steps you perform in the huge file (do you use the Grid or Author pages, do you use any toolbar actions, etc...).
We'll continue testing on our side.
Regards,
Radu
Thank you for reporting this.
Can you give us more details, like what Java Virtual Machine are you using with Oxygen?
You can check that out by going to "Help->About" and check the java.version entry in the System Properties tab.
Also in the Copyright tab you have an entry with "JVM memory used".
Also, clicking that label will issue a garbage collect request to the garbage collector.
We have automated tests which open large XML files over and over again and if there would be a memory leak with multiple files it should be noticed there.
I made some tests and indeed in Java 1.6 there seems to be a problem with the garbage collector not releasing the memory.
If you are running Oxygen with Java 1.6 can you try running Oxygen with Java 1.5? Do you see any difference?
You can see this link about how to change the Java version for Oxygen:
http://www.oxygenxml.com/doc/ug-oxygen/ ... tions.html
Also a test you could do is that after you close the huge file to open a small file, close it, and then try opening the large file again.
Please, also tell us what editing steps you perform in the huge file (do you use the Grid or Author pages, do you use any toolbar actions, etc...).
We'll continue testing on our side.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
Re: odd garbage collection behaviour
Hmmm...
I am having trouble finding consistency or a pattern.
I noticed it yesterday using Oxygen 9.1 with Java 1.6
I upgraded to 9.2 with the embedded 1.6 and saw the same results.
That is when I sent the note.
Today I took an 18Meg unformatted xml file(i.e. 1 big long line with no <CR>s)
I started 9.2. I had 3 small files that auto loaded since I had been editing them previously.
I then open the 18meg unformatted file. After 4 minutes it prompts me to format it and another 30 seconds to do the formatting.
I close it and try to repoen the unformatted file.
It gets a java out of memory error.
Ok, I then switch to java 1.5 with 9.2 and try the same experiment.
I open the 18meg file and after 8 minutes of loading I killed it.
It never got to the point of asking me to format the file.
I also have a copy of that 18meg file formatted. After formatting it is 54Meg.
With 1.5 I opened it. It opened in 35 seconds. I closed it, reopened it and got the error. Closed it and reopened it without error numerous times after that.
So, I switch back to jre 1.6 and try working with the formatted file.
Formatted file loads in 27 sec.
2nd try fails and each subsequent try works fine.
Restart Oxygen and try the unformatted file again.
4:30 to load, close/reopen fails, subsequent tries work but it takes 2:20 to load.
How I am using Oxygen seems to have little bearing on these discussions since I the problem occurs before I have done anything.
Open Oxygen, open file, see problem.
Oxygen is a great IDE and I am currently using it to dynamically create/modify open office documents using xsl driven by xml data from an extrenal source.
Thanks for you assistance,
Randy.
I am having trouble finding consistency or a pattern.
I noticed it yesterday using Oxygen 9.1 with Java 1.6
I upgraded to 9.2 with the embedded 1.6 and saw the same results.
That is when I sent the note.
Today I took an 18Meg unformatted xml file(i.e. 1 big long line with no <CR>s)
I started 9.2. I had 3 small files that auto loaded since I had been editing them previously.
I then open the 18meg unformatted file. After 4 minutes it prompts me to format it and another 30 seconds to do the formatting.
I close it and try to repoen the unformatted file.
It gets a java out of memory error.
Ok, I then switch to java 1.5 with 9.2 and try the same experiment.
I open the 18meg file and after 8 minutes of loading I killed it.
It never got to the point of asking me to format the file.
I also have a copy of that 18meg file formatted. After formatting it is 54Meg.
With 1.5 I opened it. It opened in 35 seconds. I closed it, reopened it and got the error. Closed it and reopened it without error numerous times after that.
So, I switch back to jre 1.6 and try working with the formatted file.
Formatted file loads in 27 sec.
2nd try fails and each subsequent try works fine.
Restart Oxygen and try the unformatted file again.
4:30 to load, close/reopen fails, subsequent tries work but it takes 2:20 to load.
How I am using Oxygen seems to have little bearing on these discussions since I the problem occurs before I have done anything.
Open Oxygen, open file, see problem.
Oxygen is a great IDE and I am currently using it to dynamically create/modify open office documents using xsl driven by xml data from an extrenal source.
Thanks for you assistance,
Randy.
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: odd garbage collection behaviour
Dear Randy,
We'll try to reproduce the problem.
As a side note, Oxygen 9.3 which will be available in a couple of weeks will have an archive browser and also built-in validation/content completion support for ODF documents.
So you will be able to modify/transform them directly from the ODF archive file.
Regards,
Radu
We'll try to reproduce the problem.
As a side note, Oxygen 9.3 which will be available in a couple of weeks will have an archive browser and also built-in validation/content completion support for ODF documents.
So you will be able to modify/transform them directly from the ODF archive file.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: odd garbage collection behaviour
Dear Randy,
We profiled the application and fixed a potential memory leak for the last closed editor in our code. After the fix the out of memory was reproduced only once although the file was opened and closed may times. Unfortunately sometimes the Java Virtual Machine also holds some static references to the last focused component.
Did you try opening and closing a small file before reopening the large one?
Regards,
Radu
We profiled the application and fixed a potential memory leak for the last closed editor in our code. After the fix the out of memory was reproduced only once although the file was opened and closed may times. Unfortunately sometimes the Java Virtual Machine also holds some static references to the last focused component.
Did you try opening and closing a small file before reopening the large one?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Wed Jun 11, 2008 5:48 pm
Re: odd garbage collection behaviour
Radu,
I look forward to seeing 9.3.
Will the memory leak fix get into the 9.3 release?
I did not get a chance to try the small file thing.
I am working to a deadline right now so time is limited.
I will let you know the results when I get a minute to check.
R.
I look forward to seeing 9.3.
Will the memory leak fix get into the 9.3 release?
I did not get a chance to try the small file thing.
I am working to a deadline right now so time is limited.
I will let you know the results when I get a minute to check.
R.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service