On 21/11/15 01:28, François-Paul Servant wrote:
Hi,

it seems to me that JSON-LD serialization is slow. Do you have the same feeling?
Here are the results of a comparative test that I run on my machine (outputing 
one model to a file, using Jena 3.0.1-SNAPSHOT)


Are these single run costs? i.e. from cold?

model.size() 7559
JSON-LD TIME: 649 ms

Jena use a separate self-contained engine, jsonld-java, which in trun uses Jackson.

It means taking a copy of much of the material to be printed, getting an in-memory structure then traversing it for output, including formatting the JSON so it is not all on one line and JSON-indented.

TURTLE TIME: 136 ms

That is the normal Turtle writer? It's pretty printing and so non-streaming - there are variations (RDFFormat) to printing streaming style with less prettiness but still using prefixed names. Pretty is not free.

RDF/XML TIME: 548 ms

Ditto - RDF/XML or RDF/XML-ABBREV. The default using RDFDataMgr for Loang.RDFXML is "pretty" (RDF/XML-ABBREV)

N-TRIPLE TIME: 61 ms

Is that to a spinning disk or SSD? (Given a disk write inc sync is of the order of 10ms)

        Andy


annoying...

Best,

fps


Reply via email to