rdfstore-js icon indicating copy to clipboard operation
rdfstore-js copied to clipboard

Tweak denormalizeBindingsList performance

Open datokrat opened this issue 8 years ago • 2 comments

The query engine often redundantly fetches same objects from the lexicon in denormalizeBindings(List). Using a lazy cache for the already fetched items reduces the request time significantly; an exemplar query took only 1.5 seconds instead of 10 without the tweak.

datokrat avatar Nov 27 '16 20:11 datokrat

Thanks for the improvement.

I have some basic benchmarking tests in the lubm/browser directory. I will try to run them before merging the PR.

antoniogarrote avatar Nov 29 '16 01:11 antoniogarrote

Why do you use setTimeout(..., 0) instead of process.nextTick()? I just noticed that this tremendously slows down the engine. It literally reverses the performance improvement.

datokrat avatar Dec 09 '16 22:12 datokrat