Exchange Provider: how to increase efficiency

4 posts, 1 answers
  1. Jonathan
    Jonathan avatar
    15 posts
    Member since:
    Jul 2012

    Posted 20 Jul 2010 Link to this post

    I'm having a problem with using the exchange provider with rad scheduler. The load time for data is excessive on calendars, esp when they have many recurring events. I think the reason boils down to 2 things (please let me know if there's more...):

    1. the size of the XML returned by EWS
    2. the fact that the exchange provider requests all recurring events, regardless if they will actually have an instance within the date range or not.

    1. the size of the XML returned by EWS:

    In the GetCalendarItems() method in ExchangeSchedulerProvider, I changed BaseShape from AllProperties to Default, and added the following additional properties:

    this *seems* to give radscheduler all that it needs, and the returned xml doc from EWS shrank from 2.6MB (!) to about 200K, for 124 records. This actually still seems kind of big to me, and I'm worried about scalability.

    2. Exchange Provider requests all recurring events

    It also looks like in the GetAppointments() method, the provider gets all "regular" events within the given timespan, as well as all recurring events:

    if ((item.Start < owner.VisibleRangeEnd && item.End > owner.VisibleRangeStart) ||
                      item.CalendarItemType1 == CalendarItemTypeType.RecurringMaster)

    Thinking about it, this kind of makes sense. How would we know if any given recurring event has a recurrence within a given timespan if we don't get all recurring masters, and then parse their recurrence rule, checking to see if there's an actual instance in the time we're looking at. However, this is hugely inefficient, and there must be a better way. In that example above, I'm getting 124 event records. But in that same example, I'm actually only displaying 2 of them (!). All the rest are recurring events that were set up way in the past (years sometimes), and whose recurrence has completed. And we use outlook web access here at work, where my calendars display correctly, and don't take seconds (or minutes) to load.

    Could anyone offer assistance about how to improve the responsiveness of radscheduler with EWS, esp in the case of a calendar with many recurring events.

    Thanks in advance

  2. Answer
    T. Tsonev
    T. Tsonev avatar
    2760 posts

    Posted 26 Jul 2010 Link to this post

    Hi Jonathan,

    Thank you for sharing your experience with the Exchange provider.

    I can't think of an easy way to filter the recurring appointments that don't occur in the visible range in the FindItem request. The calendarFirstOccurrence and calendarLastOccurrence fields look like exactly what we need, but they appear to be available only in the GetItem request.

    I hope you won't mind if we apply your changes to the GetCalendarItems items query. As a token of gratitude for your involvement your Telerik points have been updated.

    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Hans Santens
    Hans Santens avatar
    13 posts
    Member since:
    Feb 2010

    Posted 15 Nov 2010 Link to this post


    I am facing some perfomance issues concerning the radScheduler and the Exchangce provider. I think it might have something to do with the recurring events mentioned above. In my radScheduler I'm displaying several exchange calendars (let's say 10) and all of them contain a lot of recurring events. Now this quite some time to load.

    I still have to test some thing myself, but as I read the answer above, about not being another way to filter the recurring events, the following came across my mind.

    You can add a "calenderViewType" to the findrequest
    FindItemType findRequest = new FindItemType();
    CalendarViewType calendarView = new CalendarViewType();
    calendarView.StartDate = startDate;
    calendarView.EndDate = endDate;
    findRequest.Item = calendarView;
    FindItemResponseType findItemResponse = Service.FindItem(findRequest);

    By setting this CalendarViewType with a start- and enddate, the Exchange service will only return items which occur in the given frame (RadScheduler.VisibleRangeStart -> RadScheduler.VisibleRangeEnd).

    If anyone already knows this won't work, please let me know. I'll also post an update if I get some results
  5. Hans Santens
    Hans Santens avatar
    13 posts
    Member since:
    Feb 2010

    Posted 22 Nov 2010 Link to this post


    I got it working with the calendarViewType, ans the radScheduler now ony requests appointments which are in my defined range. The only problem I now have is the following

    Lets say you use the "startVisibleRange" and "endVisibleRange" as the range for your calendarViewType and you are in a DayView. When rendering the radScheduler everything works fine. But when you then select a date from last week. The radScheduler shows you an empty day. The reason must be the current selectedDate is not in the range of the calendarViewType.

    When clicking a butten which triggers the Rebind() mehtod, the appointments appear. But I have not yet managed to trigger this automatically with the correct values already been set.
Back to Top