Tech. Note 3: Compare/Merge LARGE files

If you are having a problem with Guiffy hanging while doing a compare/merge of a very LARGE file, the problem is probably caused by Guiffy running out of memory. If you're just trying to compare two very large files, Selecting the Show Options to only display the differences or only the differences within a few lines of context will dramatically reduce the memory required. Also, Select the Compare/Merge Options, Minimize Blocks Changed in Diff - which is faster and requires less memory. Guiffy will automatically select the Minimum Blocks Changed algorithm after it detects the file has over 32K lines. By selecting the algorithm yourself you can avoid the time it takes to detect the file size.

But, if you need to see all of the file in the compare view -or- there are very LARGE differences in the files -or- you're trying to do a merge --- you will need to give Guiffy more memory to work with. Edit the guiffy.lax file to increase the maximum heap size.

Edit guiffy.lax, change the heap.size.max line (usually about line #68). It will look like this:
lax.nl.java.option.java.heap.size.max=134217728
Change the maximum value to between 2/3 - 3/4 of your system's RAM (if you set it to more than the available RAM, thrashing may occur).

If the compare/merge of your large file takes a long time and you know there are big differences between the files, you may consider tuning the Maximum Block Size to improve performance. After the LAX.COMMAND.LINE.ARGS line:
lax.command.line.args=$CMD_LINE_ARGUMENTS$
add the line:
lax.nl.java.option.additional=-Dguiffy.block.max=BBBB
Where BBBB= The Maximum Change Block Size in number of lines. A smaller Maximum Block Size will improve the speed of the compare through large differences which can even exceed the maximum size. But, smaller Block Sizes may result in a verbose expression of the differences. The default is 2000.