From kde-pim Fri Jan 27 18:18:18 2012 From: Shaheed Haque Date: Fri, 27 Jan 2012 18:18:18 +0000 To: kde-pim Subject: Re: [Kde-pim] Problem with bulk fetching of items with 4.8 Message-Id: X-MARC-Message: https://marc.info/?l=kde-pim&m=132768850325627 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/