How to lazy load data?

Jul 15, 2012 at 5:15 PM

Is there any examples how to lazy load timeline data? Thanks.

Jul 18, 2012 at 6:20 PM

No. Can you be more specific. How do you want to load your data?

Jul 18, 2012 at 6:26 PM

I have a database with several data that I want to display using timeline. The data may span across several years and loading them in memory is not an option for me. That's why I thought displaying only a small part of the data depending on timeline current position. Is this achievable somehow? Thanks 

Jul 19, 2012 at 6:22 PM

Timeline is capable of displaying about 3000-5000 events with no scrolling performance issues. If you do not have events with durations, it can be even more (up to 10000 or more)

Here is one possible way:

1) Set current date(decide what current date is). Split your data in to several overlapping (this will provide better user expirience) intervals. Your data service should return events based on date range.

2) Download initial interval data and call ResetEvents to display them.

3) Subscribe to date changed event. From there load another inteval, if you are crossing the middle of overlapping or current date changed by other method (for instance directly setting CurrentDateTime property), and discard previous interval data. (Call ResetEvents method, show some kind of "Loading data...").





Jul 19, 2012 at 10:41 PM

Thanks Andrew, I'll try that :)

Dec 7, 2012 at 12:38 PM

Can we have any sample code for this?


I have the similar requirement. Need to load data while moving left or right. Could you please suggest me how can we accommodate the requirement?