[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Problem with bulk fetching of items with 4.8
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2012-01-27 18:18:18
Message-ID: CAHAc2jcFOFY3GS_Q0dssZF_WKGqaAD4KV-sb8qTj+ViDpXLt-w () mail ! gmail ! com
[Download RAW message or body]

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@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic