Revision b132e57...

Go back to digest for 19th June 2011

Optimization in KDE Base

Vishesh Handa committed changes in [kde-runtime/nepomuk/backupFixes] /services:

Merge the DMS ResourceIdentifier and synclib ResourceIdentifier

The SyncLib's ResourceIdentifier's identification mechanism was horribly
slow and was based on the number of properties matched ie scoring. This
approach did not give appropriate results for when the number of
identifying properties is very low.
Eg - Num Properties=4 and 1 property fails to match. Score = 3/4 = 0.75
Default threshold was 0.80, and therefore identification fails

Additionally it supported marking certain properties as 'vital',
and 'optional', which was very difficult to implement.

This new approach is based on how the DMS identifies the code.
* All properties with a literal range by default are identifying
* Certain other properties are marked as identifying
* Two resources are considered the same if no identifying property
has a different value. It's okay if the identifying property does
not exist.
If it does exist, then its value must be the same.

This patch removes scoring, and the concept of vital properties.
Optional Properties have been kept as they might be useful.

File Changes

Modified 6 files
  • /services
  •   nepomuk/storage/resourceidentifier.cpp
  •   nepomuk/storage/resourceidentifier.h
  •   nepomuk/backupsync/lib/resourceidentifier.cpp
  •   nepomuk/backupsync/lib/resourceidentifier.h
  •   nepomuk/backupsync/lib/resourceidentifier_p.cpp
  •   nepomuk/backupsync/lib/resourceidentifier_p.h
6 files changed in total