Revision fdbb446...

Go back to digest for 5th June 2011

Optimization in KDE Base

Sebastian Trueg committed changes in [kdelibs] /:

Yet another optimization.

Previously I made sure that variables are reused if they match on
properties with cardinality 1. The problem left was that Virtuoso does
not merge similar pattern. Thus, a query which contains the exact same
pattern more than once performs worse than the one that only contains
it once.
This patch ensures exactly that: ComparisonTerm does not add the main
pattern to the query string if another one already wrote it.

Sadly this makes the code even more complicated. I will see if I can
clean it up a bit to make it more readable and maintainable.

File Changes

Modified 4 files
  •   nepomuk/query/comparisonterm.cpp
  •   nepomuk/query/comparisonterm_p.h
  •   nepomuk/query/querybuilderdata_p.h
  •   nepomuk/test/querytest.cpp
4 files changed in total