We’ve recently upgraded to version to 22.2 and started to get OutOfMemory errors when comparing documents. Even differences of 5 pages of text started to consume ~2GB of memory.
Example:
- Document version 1 - empty document
- Document version 2 - 160 pages of simple text
- With version 21.3 - it consumes below 300MB of heap
- With version 22.2 - getting OutOfMemory errors even with 10GB allocated.
Code fragment:
Document doc1 = new Document(PATH_TO_V1);
Document doc2 = new Document(PATH_TO_V2);
CompareOptions compareOptions = new CompareOptions();
compareOptions.setGranularity(Granularity.CHAR_LEVEL);
doc1.compare(doc2, " ", Calendar.getInstance().getTime(), compareOptions);
Attaching example documents
versions.zip (19.2 KB)