balhoff / owl-diff

OWL diff library
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

When running through robot diff, the generated string overflows the max size #55

Open psiotwo opened 1 year ago

psiotwo commented 1 year ago

For large diffs

java -Xmx600G -jar robot.jar diff -l ... -r ... > diff.txt

ends up with

Exception in thread "main" java.lang.OutOfMemoryError
    at java.base/java.lang.AbstractStringBuilder.hugeCapacity(AbstractStringBuilder.java:214)
    at java.base/java.lang.AbstractStringBuilder.newCapacity(AbstractStringBuilder.java:206)
    at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:173)
    at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:538)
    at java.base/java.lang.StringBuilder.append(StringBuilder.java:178)
    at org.geneontology.owl.differ.render.BasicDiffRenderer$.format(BasicDiffRenderer.scala:52)
    at org.geneontology.owl.differ.render.BasicDiffRenderer$.renderPlain(BasicDiffRenderer.scala:16)
    at org.geneontology.owl.differ.render.BasicDiffRenderer.renderPlain(BasicDiffRenderer.scala)
    at org.obolibrary.robot.DiffOperation.compare(DiffOperation.java:126)
    at org.obolibrary.robot.DiffCommand.execute(DiffCommand.java:163)
    at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
    at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
    at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
    at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:62)
balhoff commented 1 year ago

I suppose we need some kind of streaming output. That probably would require some changes on the ROBOT side also.