Revision 778c6a1...

Go back to digest for 25th November 2012

Bug Fixes in KDE-PIM

Milian Wolff committed changes in [kdepimlibs] /:

Fix implementation of the PurgeBuffer.

The old code was - as far as I could see - non functional:
The safety calls to ::purge from ::buffer e.g. purged much more than
just the one requested ID from the buffer. This in turn resulted in
::buffer never returning something besides "-1".

Instead, the code is now simplified by using a QQueue FIFO.
The buffer, as I've written it now, is now working as following:

PurgeBuffer::purge(id) -> just remove id from FIFO
PurgeBuffer::buffer(id) ->
- remove id if it already is tracked (i.e. purge(id))
- ensure the FIFO is not bigger than X items, if it is, dequeue
and purge first item
- enqueue id to FIFO

Note: This patch should be the basis for evaluating the caching
parameters (MAXITEMS=10000 and MAXBUFFERSIZE=10). Especially I think
we should investigate whether the MAXITEMS should not take precedence
over MAXBUFFERSIZE, such that e.g. opening 10 10k folders does not
result in 100k of items in memory, but instead only 10k items.

2nd Note: Favorited folders are always reffed and thus never cleared
from the cache.

REVIEW: 106832
DIGEST:

File Changes

Modified 3 files
  •   akonadi/entitytreemodel_p.cpp
  •   akonadi/monitor_p.cpp
  •   akonadi/monitor_p.h
3 files changed in total