Performance improvements to tracker_triples virtual table
A series of improvements to the tracker_triples virtual table, and serialization of large sets of RDF data:
- For single-valued properties, the virtual table now prefers a full query on class tables over multiple queries for each individual property. This also means these properties for the same resource are now contiguous cursor rows.
- Graphs are moved to the outer loop, in order to improve grouping of per-graph data in Trig
- Other small perf improvements in TrackerSerializer subclasses.
Without this branch:
$ time tracker3 export -d ~/.cache/tracker3/files >/dev/null
real 1m25.611s
user 1m8.556s
sys 0m4.249s
With this branch:
$ time tracker3 export -d ~/.cache/tracker3/files >/dev/null
real 0m51.815s
user 0m50.395s
sys 0m1.134s
For the same ~28.5 million triples.