Hello,
I want to load a big ontology from the web in Jena.
Its URL is http://datao.zerezo.com/bbcmusic.owl.gz

My code is something like:
URL url = new URL("http://datao.zerezo.com/bbcmusic.owl.gz";);
InputStream fis = url.openStream();
m = ModelFactory.createDefaultModel();
fis = new GZIPInputStream(fis);
fis = new BufferedInputStream(fis);
m.read(fis, "", null);
fis.close();

It takes forever to load.
But if you look at the ontology itself, you will see that it is basically
a big XML comment.

I removed the comment from the ontology and created a new gzip file.
Its URL is http://datao.zerezo.com/bbcmusic2.owl.gz

With the code above and this new URL, the load is pretty fast.

Is the XML parser to blame for such a slow load?
Or something related to DOM parsing instead of SAX parsing?

I wonder why such a performance penalty happens.

PS: as far as I understand, accessing the data through the network was
not cause of the slowness.
I get similar performances with the files on the local filesystem +
URLs of type file:///

Reply via email to