Tech. Note 3: Compare/Merge LARGE files/folders

When comparing very large files or folders/file trees, Guiffy may seem to hang. The user interface will still be responsive - but, the compare view doesn't finish. In such cases Guiffy probably needs to be allowed to allocate more memory (heap space). Guiffy's default maximum heap space is 25% of available memory. To monitor Guiffy's memory usage enable the Memory Meter in the View -> Toolbars... dialog. If Guiffy is running out of memory, follow the notes below to increase the maximum heap size.

Large Folders/File Trees

For large folder/file tree compares with thousands of files/folders, follow the instructions below for increasing the maximum heap size.

Large Files

Guiffy's I/O runtime library supports 64-bit byte addresses - files > 2GB.

Guiffy includes separate algorithms for very large files to minimize memory requirements and boost performance.

Guiffy's variables for line numbers are 64-bits - line numbers and the metrics such as number of lines matching > 2GB.

Guiffy's default Show Options (Options -> Show) are setup to implement "Folded Compare/Merge Views" for Larger files (Over 400KB). "Folded Compare/Merge Views" display only the differences within a few (default of 10) lines of context. This dramatically reduces the memory and time required to display large file compares or merges.

Guiffy file compare has been tested on 25GB files with over 2GB lines. In this test only 1 line was changed.

But, if you need to see all of the file in the compare view -or- there are very LARGE differences in the files --- you will need to give Guiffy more memory to work with.

On Windows, MacOS, and Linux platforms:
Edit the file located in Guiffy's install folder to increase the maximum heap size. Guiffy's default install paths are: Edit, add the vm_parameter to change the maximum heap size.
Where the 512m above specifies 512MB.

NOTE: Multiple vm_parameters are separated by space: For example:
vm_parameters=-Dguiffy.laf=com.formdev.flatlaf.FlatDarkLaf -Xmx512m

On Unix and Other platforms:
Edit the guiffy.lax file located in Guiffy's install folder to increase the maximum heap size. Guiffy's default install paths are: NOTE: To replace the guiffy.lax file you will need to open the file as Administrator or SuperUser. Be sure once you're done and save the guiffy.lax file, the file is actually updated in the Guiffy install folder.

Edit guiffy.lax, change the heap.size.max line (usually about line #68). It will look like this:
Where the 512m above specifies 512MB. To specify 1GB for example:
Note: Do not change the maximum value to more than 3/4 of your system's RAM (if you set it to more than the available RAM, thrashing may occur).
Note: If the guiffy.lax file installed does not have a heap.size.max line, add the line below the line.

On MacOS X the maximum heap size is specified in the guiffy application file's Info Plist. To change the maximum:
1) Ctrl Click on the guiffy application file
2) Show Package Contents
3) Ctrl click on Info Plist, Open With Property List Editor
4) Edit Root, Java, VMOptions, -Xmx256M

Each of Guiffy's compare/merge views (1st, 2nd, and merge result) are limited to 2 G characters.

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:
add the line:
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.

Documentation by Guiffy Software, Inc. 2023