EWS on Exchange 2010 - ExchangeServiceBinding.GetItem Very Slow RRS feed

  • Question

  • Hi,

    Using EWS to search for emails. If the email has been "touched" by EWS recently, the response to the search is fast (20-30ms or so). If it has not, the response is rather slow (20-30 seconds or so - 1000 times slower).

    The code is as such:

    GetItemType getItemRequest = new GetItemType();
                ItemResponseShapeType itemProperties = new ItemResponseShapeType();
                itemProperties.BaseShape = DefaultShapeNamesType.AllProperties;
                getItemRequest.ItemShape = itemProperties;
                BaseItemIdType[] ids = new BaseItemIdType[1];
                ids[0] = idToGet;
                getItemRequest.ItemIds = ids;
                GetItemResponseType getItemResponse = exchangeServer.GetItem(getItemRequest);

    I need the search to be fast (ie under 1 second). Is there a "better" EWS method, or are there some tweaks that need to be made in Exchange itself?

    Many thanks.

    Monday, May 13, 2013 11:40 AM

All replies

  • This isn't doing a search its just doing a bind what does the code that gives you the ID in idToGet look like ? (eg you finditems operation). What parameters are you searching on ?



    Tuesday, May 14, 2013 9:15 AM