[Kde-pim] nepomukfeederagent optimization

Christian Mollekopf chrigi_1 at fastmail.fm
Mon Oct 1 18:56:01 BST 2012


On Monday 01 October 2012 15.54:46 David Faure wrote:
> On Saturday 29 September 2012 14:28:44 Christian Mollekopf wrote:
> > We're using the PLD and the FLAGS (only in the mail feeder) and in one
> > commented place (also mailfeeder) the modificationTime.
> 
> Thanks for that info. What is the precise name of the part for the
> "modificationTime" ?
> 

No idea. It's accessed using Akonadi::Item::modificationTime().

> In fact the question is: should I whitelist or blacklist?
> 
> Blacklisting approach (as suggested by Volker's followup) :
> 
> +  QSet<QByteArray> parts = partIdentifiers;
> +  // Remove parts that we don't use in nepomuk, to avoid unnecessary
> re-indexing +  // We care for FLAGS, and PLD (headers, body), possibly for
> modification time +  QMutableIterator it( parts );
> +  while ( it.hasNext() ) {
> +      const QByteArray part = it.next();
> +      if ( part == "REMOTEID" || part.startsWith( "ATR:" ) ) {
> +        it.remove();
> +      }
> +  }
> +  // Nothing to re-index if only the flags have changed, or only the remote
> ID +  if ( parts.isEmpty() )
> +    return;
> 
> The whitelisting approach would be "reindex only if the modified parts
> contain FLAGS or PLD:RFC822 or PLD:HEAD" -- or whatever "modification time"
> fits into.
> 
> David, a bit clueless about the possible "parts" here.

I also couldn't find a list of the available parts so far, so I don't really 
know more. Volker?

I'm fine with blacklisting some parts we know are not required (i.e. 
REMOTEID), but generally I think we should just pass the changed parts to the 
indexing plugin, so the plugin can decide which updates to ignore (due to the 
varying requirements among plugins). In the plugincode we can then use 
whitelisting for the parts required as well as differentiate between full 
reindexing (payload changed), and simple status updates (flags changed).

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