RDFDataMgr should be faster, but would be used by model.read() anyway after
its initialization.

It is also possible to do streaming reads,  where you get each triple as it
is read (and no Model). Combined with streaming writes this is the fastest
way to do format conversions (e.g. RDF/XML to Turtle).

If you need to shuffle RDF between different Jena instances you might like
the binary Thrift-based format which can be significantly faster and more
compact than the rest.

What kind of Model are you reading into? Memory or disk-based? For tdb
there is the tdbloader and (on Linux/unix) tdbloader2 utilities you can run
from the command line.

Apologies for not having any links above as I am posting from mobile, I am
sure others will fill me in where needed.
On 17 Feb 2015 15:18, "Marco Tenti" <[email protected]> wrote:

> Hi, everyone, i have two file of triples (order of GB) , Jena provides many
> methods to read and write files triple, I'm wondering what is the best
> methods for read/write the models of jena, In terms of speed and memory.
> For example, in reading phase is better use
> org.apache.jena.riot.RDFDataMgr.read(...)     or
> com.hp.hpl.jena.rdf.model.Model model -> model.read(...) ?
>
> Ty in advance, Greetings.
>

Reply via email to