I am doing my own ajax call to create a sections array and an events array. I then call scheduler.updateCollection(sections) and scheduler.parse(sections).
I show an animated loading gif while I run the ajax request and build the arrays. The gif stops animating untilthe updateCollection call has finished, obviously because scheduler is processing all of the sections.
Just wondering if there is any other way to optimize this. Unfortunately I cannot reduce the number of sections as I am using the timeline component and showing 2 weeks of jobs and there is 50 jobs per week.
Are you calling scheduler.updateCollection only once or from the loop ?
The single call must not be so performance expensive. Can you share an example of “sections” array that causes such long rendering.
Just once after I’ve built the array. I have included the code below but removed the redundant stuff.
I have already debugged to make sure it wasn’t the $.each of scheduler.parse functions. If I comment out the updateCollection call there is no freezing.
I have found the issue and it is actually to do with addMarkedTimespan. In my project, I want to highlight the day that a job (section) starts so that events can be added from that date.