0

I'm using Apache Jena TDB to load many files for future reference, when I load using the getDefaultModel method (default model), everything happens normally, but when I try to use a named model the process gets very slow and the CPU reaches 100%, sometimes memory overflow occurs.

Can anyone tell me the difference between the default model and the named model?

I can not understand the difference and I think they should have the same behavior.

model = dataset.getDefaultModel();
TDBLoader.loadModel(model, file.getAbsolutePath());

Vs

public static final String ALL_STORAGE = "http://instance/allstorage";
model = dataset.getNamedModel(ALL_STORAGE) ;
TDBLoader.loadModel(model, file.getAbsolutePath());
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • Please ask this on the Jena mailing list, this is much more appropriate than StackOverflow. And don't forget to add more details. What's `dataset`, how large, how much memory do you assign, why do you use namedModel etc. And clearly, loading named graphs can be a difference depending on what `dataset` contains. – UninformedUser Jan 26 '18 at 12:58
  • "the CPU reaches 100%, sometimes memory overflow occurs." -- suggestive that the heap isn't quite big enough and is close to exhaustion causing the GC to run excessively. – AndyS Jan 27 '18 at 14:34

0 Answers0