Revision 7bef7c5...

Go back to digest for 12th August 2012

Optimization in KDE Base

Vishesh Handa committed changes in [nepomuk-core/KDE/4.9] /:

ResourceWatcher: add *count() methods for resources, properties and types

These count methods are faster than returning the full list and then
counting the number of items in the list.

This also fixes an infinite loop where a temporary Resource is created
when querying for the number of resources being watched. The temporary
Resource is deleted, which results in ResourceData::resetAll being
callled which again called ResourceWatcher::resources(), and the cycle
countinues.


REVIEW: 105927

File Changes

Modified 3 files
  •   libnepomukcore/datamanagement/resourcewatcher.cpp
  •   libnepomukcore/datamanagement/resourcewatcher.h
  •   libnepomukcore/resource/resourcedata.cpp
3 files changed in total