[Kde-pim] nepomukfeederagent optimization

David Faure faure at kde.org
Mon Oct 1 16:54:46 BST 2012


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" ?

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.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

_______________________________________________
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