locked
Performance comparison SyncFolderItems vs. FindItem in EWS RRS feed

  • Question

  • There are two ways to get changes from Exchange using EWS API:

    1. Use SyncFolderItems to get a list of changed items
    2. Use FindItem to get a list of changed items (filtered by modify time)

    My use case is not the typical mobile sync email situation. I just want to quickly scan mailboxes and find new items since last scan (so I don't care about changed items, read status, deleted items, ..).

    Since many mailboxes need to be scanned, performance is a major consideration. I thought that SyncFolderItems would be more efficient as it only works on 'changes'. However, from my testing with large mailboxes/folders (for example, 20000+ items in folders, with 200 new items each folder), it appears that the performance of SyncFolderItems and FindItem are the same. 

    I'm inclined to use FindItem based on the testing result, as this approach is simpler and no need to maintain the Sync State information for SyncFolderItems. I'm wondering if Microsoft or someone can help to confirm this finding, or are there some other considerations? Thanks!

    Wednesday, November 16, 2016 9:12 PM