We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Schedule is slow when lots of data is loaded

Thread ID:

Created:

Updated:

Platform:

Replies:

145619 Jul 1,2019 02:40 PM UTC Jul 2,2019 10:58 AM UTC Angular - EJ 2 1
loading
Tags: Schedule
Vasil
Asked On July 1, 2019 02:40 PM UTC

We have around 500 events loaded in a month, and having unnecessary data manipulation in between actions (change views, selected date,...) seems to be really costly.

Can't really understand how and if the scheduler caches the data, but we would need to have something like the CacheAdaptor, which will not load already loaded data. We get an error when we use the CacheAdaptor, taking in account that it isn't included in your new docs I assume it's still not for regular use.
We are using the UrlAdaptor now.

Another approach we tried is with local data, and although we have full control of the requests to the server (we can do local caching and not send unneeded requests), manipulating the events with scheduleObj.addEvent, scheduleObj.deleteEvent and scheduleObj.saveEvent is much much slower than leaving that problem to the scheduler's data manager.

Also, the schedule obviously freezes the window when these tasks take a long time to process and not sure if there's any async way of doing that.

So, my question is how to improve the schedule's speed when working with a lot of events?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On July 2, 2019 10:58 AM UTC

Hi Vasil, 
 
Syncfusion greetings. 
 
We have checked the reported case in the below sample where nearly 1000 events were loaded and Scheduler took only the reasonable time for rendering it. We internally filter and render the events based on its current view range both on initial load and navigate actions.  
 
JS2 Scheduler will raise post for every CRUD and navigate actions with current view start and end date as parameters. The below url function LoadData will return the filtered data on initial load, every CRUD action and navigate actions. 
 
public eventSettings: EventSettingsModel = {  
    dataSource: new DataManager({  
      url: 'http://localhost:54738/Home/LoadData'// Here need to mention the web api sample running path  
      crudUrl: 'http://localhost:54738/Home/UpdateData',  
      crossDomain: true,  
      adaptor: new UrlAdaptor  
    }),  
  };  
  
public JsonResult LoadData(Params param)  // Here we get the Start and End Date and based on that can filter the data and return to Scheduler  
        {  
            var data = db.ScheduleEventDatas.Where(app => (app.StartTime >= param.StartDate && app.StartTime <= param.EndDate) || (app.RecurrenceRule != null && app.RecurrenceRule != "")).ToList();  // Here filtering the events based on the start and end date value.  
            return Json(data, JsonRequestBehavior.AllowGet);  
        }  
  
public class Params  
        {  
            public DateTime StartDate { getset; }  
            public DateTime EndDate { getset; }  
        }  
 
 
Regards, 
Karthi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon