This is the code I use to measure:
long startTime = System.nanoTime();
Txn.executeRead(dataset, () -> {
Iterator<String> list = dataset.listNames();
while (list.hasNext()) {
list.next();
}
});
long endTime = System.nanoTime();
log.info("List execution time: " + (endTime - startTime) / 1000000 + "ms");
On 2017-11-15 12:02, George News wrote:
> Hi,
>
> I would like to know if there is any way of speeding up
> Dataset.listNames(). Currently running it on a TDB with 200 graphs it
> takes something like 10 seconds.
>
> I think it is quite a lot, as there should be some index pointing to them.
>
> Could you please tell me how I can speed up? I'm now currently thinking
> on uploading all the graphs names in memory when starting my service and
> then use the names from memory.
>
> Regards,
> Jorge
>