Open vhschlenker opened 3 years ago
As I added a few mappings to my rules, I discovered that even 8g does not seem to be enough anymore.
But even after playing around a bit with different options, like changing the output format (RDFFormat.TURTLE_FLAT
was proclaimed as a bit easier on the memory) or using other means to write the model, I found no other solution.
At least I learned, that the problem lies in the conversion to XML (or whatever output format is set). The creation of the united model, or the mapping are running smoothly. But to create an XML to write, it seems that the entire model has to be somehow converted in memory.
Using the Stardog jena library to avoid writing the model to disk also run into memory issues.
The only solution I see, beside adding more memory, is to avoid any form of conversion. This means, that the output model would not be written, and that the conformance checking should happen without stardog.
It might be possible to optimize the XMLWriter from jena or relive some pressure there by prebuilding the model, but I have yet to found a way how to do that.
Edit: Requesting a deduction model from the created inference model, or just requesting the size of the inference model also runs OutOfMemory. The united model, on which the reasoner is applied and from which the inference model is created, currently has 84548 statements, and I don't know if that is "too much" or if the problem lies somewhere else. Manually limiting the rules in the reasoner seems to help, but I did not find one mapping rule which could be a problem.
When analyzing multiple big projects (like the cwa verification, testresult and regular server and the android app) the model gets too big to be written with a heap size of 4 GB. This can be circumvented with arguments like
-Xmx8G
but could lead to problems when running in CI-environments where resources could be limited.The stack trace: