Closed joachimvh closed 4 years ago
Also tested this with curl:
curl http://localhost:3000/sparql -X POST -g -d "query=PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> SELECT ?movie ?title ?name WHERE { ?movie dbpedia-owl:starring [ rdfs:label \"Brad Pitt\"@en ]; rdfs:label ?title; dbpedia-owl:director [ rdfs:label ?name ]. }" -w %{time_total}
Which has pretty much the same result. Also didn't realize this but I still had the timer in ldf-client
so I also got the result from that (since ldf-client-http
spawns a process of ldf-client
) and the result there corresponded to the original ldf-client
result. So the delay is probably somewhere in the spawning the or http communication.
Makes me wonder about https://github.com/LinkedDataFragments/Client.js/blob/v2.0.5/bin/ldf-client-http#L99 again too.
This project has now been deprecated in favor of Comunica, where this should not be a problem anymore. If it is, feel free to open a new issue there.
The following query was executed both on
ldf-client
andldf-client-http
:Using
ldf-client
, for me this gets executed in +- 1200ms. On the other hand, withldf-client-http
and the following code to send the query, it takes +- 1700ms before the stream is terminated (same machine).I tried one other query (select 10000 triples) but there I had slowdown due to printing all the results (although ldf-client was also faster, 3s vs 4s, when disabling the output, but that might be biased). Most interesting would be a query that doesn't have many results but takes a longer time to see if this is a constant extra time or if it scales.