By default DeltaWalker is configured to run with the following heap-related JVM arguments:
DeltaWalker -vmargs -Xms64M -Xmx1024M
where -Xms64M sets the initial Java heap size and -Xmx1024M sets the maximum Java heap size. These should be sufficient when comparing folder hierarchies with tens, even hundreds of thousands of files and folders. Comparing even larger folder hierarchies can cause DeltaWalker to slow down and/or run out of memory; in such cases consider comparing the hierarchies in smaller chunks. Increasing the memory available to DeltaWalker beyond the default settings is unlikely to produce better results as many factors come into play when comparing very large hierarchies. Same holds true when comparing very large text files, which is why text files larger than 50MB are compared using a byte-by-byte comparison algorithm as its much faster and uses much less memory.
With the above in mind, there are two easy ways to change the DeltaWalker heap size:
DeltaWalker -vmargs -Xmx2000M
On Mac OS X the full path to the DeltaWalker executable needs to be specified:
/Applications/DeltaWalker.app/Contents/MacOS/DeltaWalker -vmargs -Xmx2000M
For a list of options supported by your JVM type on command line:
java -XOptions starting with -X are implementation-specific and may not be applicable to all JVMs.