Optimizing retrieval of recurring appointments

G

Guest

I have a few more questions about the retrieval of recurring appointments as
it seems to be the major bottleneck in my code.

1. When you set Items.IncludeRecurrences to true, Does the processing to
determine individual appointments with Items.Find get done on the Exchange
Server or is the recurrence pattern returned to Outlook, which then
determines the individual appointments?

2. If the Exchange Server is doing all the processing, would it be more
efficient to get the recurrence pattern and interpret the individual dates
locally. I know this would be extra coding but if it means a performance
gain I'm willing to do it. (I also know that Dmitry has plans to implement
this kind of functionality in Redemption but not sure whether the processing
would take place remote or locally and when the version that does this will
be available - Dmitry, maybe you could advise.)

3. I noticed that the first time I execute Items.Find takes considerably
longer. Is this because there is some kind of cache being generated on the
Exchange Server? Or is Outlook creating a cache of some sort?

4. In an earlier thread I suggested it might be more efficient to only
return items that had been updated since a particular date (eg x days ago)
but Dmitry rightly pointed out that this would not help determine deleted
items. I'm thinking now that perhaps it would worth getting all the items
first with IncludeRecurrences set to false, comparing those to my local data
set and figuring out which ones have been deleted; then retrieving recently
modified items for the efficiency gain. I know this might seem to be a
double-pass but getting all items excluding recurrences is quite quick and I
could then safely filter out the unchanges items on the second pass. Would
this work?

Sorry for the lengthy post - I am trying to be clear in my questions.

Tad
 
D

Dmitry Streblechenko

1. It is done locally
2. You don't really have a choice - see #1 :)
3. Yes, Exchange builds indices of the properties used in the search
criteria. Outlook might be doing its own caching too.
4. That should work, but again, ICS is the preferred API

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Guest

Thanks, Dmitry

2. If it is done locally then does Outlook do it more efficiently than one
could code it?

Will you be using ICS in your implementation?

Tad
 
D

Dmitry Streblechenko

The most time consuming part is the actual data retrieval, which your code
can match if you are careful enough.
I don't think I promised anything about ICS in Redemption :) Next versions
will support the recurence pattern for the tasks and appointments, but I am
still thinking about the recurrence support for the Items collection... None
of that will use ICS in any way, which is Exchange specific and only useful
for synchronization.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Guest

Dmitry,

Sorry for the ICS red-herring.

You say the most consuming part is the actual data retrieval but in your
initial response to my post you say the processing is done locally - so I'm
confused. It certainly doesn't seem be impacting CPU on my local machine,
which suggests the processing of the recurrence pattern is being done on the
server. When you say "data retrieval" do you mean querying the server or
extracting data from a recurrence pattern?

When you say you will be building support for the recurrence pattern do you
mean retrieving the BLOB and translating it but not actually extracting all
the individually occuring items from the pattern?

tx, Tad
 
D

Dmitry Streblechenko

I meant that the processing is done locally *after* the data is sent over
the network. The query processing on the server and data transmission are
the most expensive time wise. The local expansion of the recurrence blob is
cheap in terms of the CPU cycles, but expensive in terms of the developer's
man-hours :)
By supporting the the recurrence in Redemption I meant that I will defintely
expose the Redemption version of the RecurrencePattern object in OOM,
returned by the GetRecurrencePattern method. The blob itself can be accessed
now using the Fields() collection.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top