[Kde-pim] Review Request: Add indexing throttling and fixed endless indexing problems

Sebastian Trueg sebastian at trueg.de
Thu Feb 16 13:17:17 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103994/
-----------------------------------------------------------

Review request for KDEPIM and Christian Mollekopf.


Description
-------

The original problem was the mentioned bug: high Virtuoso CPU load.
This patch is a combination of all the commits from branch "throttleNepomukFeeder". I do not know how to do it better.
The patch addresses the following issues:

1. Indexing is throttled during user activity. The high prio queue is delayed only a little bit while the low prio queue is slowed down considerably - although not stopped completely. While my personal opinion is to throttle both the same way I wanted to keep the spirit of the original code alive.

2. When put offline the feeder is actually offline and does not do anything anymore. This is IMHO very important as it is what users expect. Previously the feeder claimed to be offline but would actually continue to work the high prio queue. This looks very buggy to a user.

3. The endless indexing problem is fixed. This was caused by the fact that the feeder would reindex everything at startup until it finished the initial index once. That means that you had to leave your computer alone until the indexing was finished. Otherwise it would just start over again after the next reboot. This was caused by the fact that user interaction would stop the initial indexing completely.
I solved this problem with 2 new meta-data properties: nie:lastModified now stores the modification date of the item and the new property aneo:akonadiIndexCompatLevel stores the compat level on each item. That way only what actually changed or needs an update is re-indexed.

4. Even updating all collections will not reindex each item. Only those which actually changed or need to be updated due to an improved indexer are re-indexed. Currently that makes the mReindex variable in the feederqueue useless but I left it in in case you ever want to introduce a way to forcefully update everything.

5. Less queries are used to check if an item needs to be re-indexed.

There are still open issues but they are not related to the CPU usage problem.


This addresses bug 289932.
    http://bugs.kde.org/show_bug.cgi?id=289932


Diffs
-----

  agents/nepomukfeeder/CMakeLists.txt 82ea7c9 
  agents/nepomukfeeder/feederqueue.h ecbd8b7 
  agents/nepomukfeeder/feederqueue.cpp 9274daf 
  agents/nepomukfeeder/nepomukfeeder-config.h.cmake PRE-CREATION 
  agents/nepomukfeeder/nepomukfeederagent.h 94ff1d2 
  agents/nepomukfeeder/nepomukfeederagent.cpp edb3e29 
  agents/nepomukfeeder/nepomukhelpers.cpp 294516c 
  agents/ontologies/aneo.trig f19d068 

Diff: http://git.reviewboard.kde.org/r/103994/diff/


Testing
-------

I tested and so did some people from the bug report. All works fine.


Thanks,

Sebastian Trueg

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list