Revision 4a21717...

Go back to digest for 2nd September 2012

Optimization in KDE Base

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

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.

Ported from nepomuk-core 7bef7c53d3b9a971c203ed4391bf19ac79f381f5

File Changes

Modified 3 files
  • /core
  •   nepomuk/resourcedata.cpp
  •   nepomuk/resourcewatcher.cpp
  •   nepomuk/resourcewatcher.h
3 files changed in total