[Kde-pim] Problem with bulk fetching of items with 4.8

Shaheed Haque srhaque at theiet.org
Fri Jan 27 18:18:18 GMT 2012


Hi Kevin,

Given that I want to do bulk fetches from Exchange, it would be nice
to do bulk writes to Akonadi too. Since all the various Item-related
Job work on single items at a time, I'd like to continue using the
itemsRetrievedIncremental() API. So, how about if I rearrange the code
to avoid calling cancelTask, i.e. like this:

retrieveItems()
{
   ...
   scheduleCustomTask("retrieveGALItems")
   // Don't cancelTask() , just return.
}

retrieveGALItems()
{
   ...
   fetch 300 items from Exchange
   itemsRetrievedIncremental(items);
   if (no more items) {
      itemsRetrievalDone();
   } else {
       // go around again.
       scheduleCustomTask("retrieveGALItems")
   }
}

IIUC, the context for itemsRetrievedIncremental() will be correct, and
this should be the most efficient way to do it. DOes that sound
plausible?

Thanks, Shaheed
_______________________________________________
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