Allocating more memory to diff Files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Allocating more memory to diff Files

Post by Gerald »

I receive this error message when I try and diff some files.

Please restart after allocating more memory to diffFiles.
For this modify the parameter -Xmx in the startup script, for example -Xmx700m.
In case you were running a diff tool when this problem occurred you can try to use another algorithm next time.
For more details see the 'Performance problems' and 'Setting a parameter in the startup script' sections of the User Manual.

The files sizes are 1,535 KB and 1,750 KB. I am using version 10.2 of oxygen.

Any and all help is greatly appreciated.

TIA,
Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

Hello,

If the number of differences between the two files is very large you can get an OutOfMemory error with the default allocated memory. You should set more memory with the startup parameter -Xmx. For example for allocating 800 MB you have to set the parameter -Xmx800m in the startup script which is called oxygen.vmoptions if you use the Diff Files tool from the Tools menu of Oxygen (oxygen.exe), diffFiles.vmoptions if you started the standalone tool Diff Files (diffFiles.exe).


Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

I have tried to increase the memory by opening oxygen.vmoptions with notepad and chaning the value to 800. But I still get the error message. Is this not the right way to do this? If not I am not well versed with java to do this could you provide the steps to change the value?

Thanks,
Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

How do you start the application? Do you use the launcher Oxygen XML Editor? If yes please post the content of the file oxygen.vmoptions located in the Oxygen install folder. It should contain a line that specifies

Code: Select all

-Xmx800m
If not: do you use the launcher called Diff Files? If yes please post the content of the file diffFiles.vmoptions located in the Oxygen install folder. It should contain the same setting:

Code: Select all

-Xmx800m

Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

I generally use the start--> All Programs--> Oxygen XML Editor 10.2--> Diff Files. Below is the code out of the diffFiles.vmoptions.

Code: Select all

-Xmx800m
-Dcom.oxygenxml.language=English
-XX:+UseParallelGC
Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

The -Xmx parameter is set correctly. It seems the nesting level of XML elements and the total number of differences between the two files are very large so that more than 800 MB of memory are necessary for completing the diff operation. Close the appplication, replace the -Xmx800m parameter with -Xmx1000m or -Xmx1200m and try again. If it does not work can you send us the two files (1,535 KB + 1,750 KB) for reproducing the problem?


Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

I set the option to 1500m and it still gives me the error. How do I send you the files?

Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

Attach the files to an issue report.


Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

Thank you for the files. Did you compare the files with the XML Accurate method? For these two files you get an OutOfMemory error because this method is good only for smaller files. For large files you should select the XML Fast method in the toolbar available in the DiffFiles window and for these two files (1,535 KB vs. 1,750 KB) you will get 269 differences without increasing the memory with the -Xmx parameter. Or you can select the Lines method and you will get 137 differences.


Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

Yes I was using the accurate option. I changed the option to fast and it did process.Can you tell me what is the difference between xml fast and xml accurate is? Is there any advantage to using the accurate over the fast?

Thanks,
Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

The XML Accurate method is more precise than XML Fast and should be used for smaller documents because it requires more memory than XML Fast for searching for the match of each XML element of document 1 over a larger scope (a larger subset) of the set of XML elements of document 2.


Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

I mainly work with large files and need the ability to get the differences between the files. Is there any plans to allow the XML Accurate method to diff large files?

Gerald
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allocating more memory to diff Files

Post by sorin_ristache »

The limitation is intrinsic in the algorithm because the scope of the search for a match grows with the number of XML elements of the document. Maybe the scope could be limited for very large documents but we do not have a plan yet for modifying these diff algorithms used in the Diff Files tool. We will consider it for a future version.


Regards,
Sorin
Gerald
Posts: 7
Joined: Mon Jun 29, 2009 10:28 pm

Re: Allocating more memory to diff Files

Post by Gerald »

Thanks for the info and help.

Gerald
Post Reply