Leveraging Schedule's lazy loading feature
The Schedule
component provides a calendar to manage events, such as Outlook Calendar or iCal . By default, a whole set of events is eagerly provided via ScheduleModel
. That means all events are loaded at once on page load. Lazy loading feature helps to improve performance if we have a huge dataset of events or events take much time to load. In the lazy loading mode, only events that belong to the displayed time frame are fetched.
In this recipe, we will implement a small example for the Schedule
component's lazy loading feature.
How to do it...
By default, the
view month
is displayed, so the user sees a whole month and can switch between months. Assume we have to load events for 12 months and every month needs, on average, 1.5 seconds for event loading. The default eager mode would take 18 seconds (12 x 1.5) to load all events. This is too long, so using the lazy loading feature is recommended to increase performance. The piece of the XHTML...