Akonadi::Server::CollectionStatistics

Akonadi::Server::CollectionStatistics Class Reference

#include <collectionstatistics.h>

Public Member Functions

 CollectionStatistics (bool prefetch=true)
 
void expireCache ()
 
void invalidateCollection (const Collection &col)
 
void itemAdded (const Collection &col, qint64 size, bool seen)
 
void itemsSeenChanged (const Collection &col, qint64 seenCount)
 
Statistics statistics (const Collection &col)
 

Protected Member Functions

virtual Statistics calculateCollectionStatistics (const Collection &col)
 
QueryBuilder prepareGenericQuery ()
 

Protected Attributes

QHash< qint64, Statistics > mCache
 
QMutex mCacheLock
 

Detailed Description

Provides cache for collection statistics.

Collection statistics are requested very often, so to take some load from the database we cache the results until the statistics are invalidated (see NotificationCollector, which takes care for invalidating the statistics).

The cache (together with optimization of the actual SQL query) seems to massively improve initial folder listing on system start (when IO and CPU loads are very high).

Definition at line 35 of file server/storage/collectionstatistics.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 23:21:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.