[Kde-pim] More Nepomuk Feeder Improvements

Christian Mollekopf chrigi_1 at fastmail.fm
Wed Jun 5 09:49:53 BST 2013


On Tuesday 04 June 2013 21.43:58 Vishesh Handa wrote:
> On Wed, May 29, 2013 at 6:42 PM, Christian Mollekopf
> 
> <chrigi_1 at fastmail.fm>wrote:
> > Indexing more recent emails first is certainly a good idea if it can be
> > done
> 
> Done
> 
> I've added the following features -
> * Suspend when on Battery
> * Index all items based on modification date
> * Emails are given the lowest priority
> * Removed special manual collection indexing code from the Scheduler

Then we are no longer able to index collections manually.
That breaks the "Force Reindexing" in the folder-properties dialog in KMail, 
doesn't it?

> * Do not index the collections contents when indexing a collection
> * Other cleanups
> 
> If there are no major objections, then I'll merge this branch into master
> tomorrow before the hard feature freeze. We can fix all the minor problems
> after that.
> 
> Current problems I've noticed -
> 
> * The plain text of the email isn't always stored - I probably broke
> something
> * The Agent never gets notified when a new item is added/modified or
> removed - This means there is no realtime indexing.
> 

argh... that's of course because of the disabled changerecorder (that's what 
the itemAdded etc. slots connect to in agentbase).


Just add:

changeRecorder()->fetchCollection( true );
changeRecorder()->itemFetchScope().setAncestorRetrieval( 
ItemFetchScope::Parent );
changeRecorder()->setAllMonitored( true );
changeRecorder()->itemFetchScope().setCacheOnly( true );
changeRecorder()->setChangeRecordingEnabled( false )

That way the changerecorder behaves like a monitor. The manual change-replay 
is no longer required.

> Overall the code is in a much better state right now.

Cool.

If the code behaves better than what we had before, feel free to merge it in.
Maybe try to remove/add an email account, so the findunindexeditems job finds 
like 300'000 results or so and check what happens to the memory consumption.
It used to use ~80Mb for that (temporarily). Just make sure it doesn't explode 
;-)

Cheers,
Christian
_______________________________________________
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