Performance issue weekly view scheduler with more data.

Dear Support,

We are trying to render schedule data say for 60 resources. We could see that rendering the weekly view is just taking too long. I have attached the sample where you can experience the issue.

Please note that I have tried "allowVirtualScrolling" and that seems to be creating weird rendering issue. 

<ViewDirective option="TimelineWeek" allowVirtualScrolling={true} />

In the attached sample - look at the report.js component. You would "refreshData" method is refreshing the data, in our real app that part is being replaced by call to our api backend.

Can you suggest what we can do to optimize this perf. issue.

One more question - In weekly view - by default we have 2 cells per hour per day. Can we change that say to have only 1 cell per hour or 1 cell per 2 hour to reduce the number of <td/> being generated

Thanks.

Attachment: Sample_d471bbbf.zip

9 Replies

VM Vengatesh Maniraj Syncfusion Team May 11, 2020 11:23 AM UTC

Hi Rama, 

Greetings from Syncfusion Support. 

We have validated your reported issue Performance issue in week view scheduler with more data in the shared sample and we suspect that you have rendered the resource in the created event and wait for 2 minutes to generate the resource details which could be the cause for this issue. We suggest you please generate all the resource data and events data before rendering the scheduler to avoid the performance related issues. We have checked the performance issue with the below sample that contains 60 resources and 3600 events and it could be rendered around 2800 milli seconds. 


And, you have asked another query that 1 cell per hour to reduce the td count and it can be possible by making use of timescale property like the below code. 

 timeScale={{ enable: true, interval: 60, slotCount: 1 }} 


This code changes also included in the above shared sample. Kindly check the sample and get back to us for the further assistance. 

Regards, 
Vengatesh  



RA Rama May 12, 2020 02:11 AM UTC

Hi Vengatesh,

Thank you for your response. But in real world .. It is not realistic to load all the events for all dates from server.

That is why I have create a stub method "refreshData" that simulates data loading from api everytime user changes the date range or view (today, month, week)

What change will you recommend to make if we cannot pre-load entire data


VM Vengatesh Maniraj Syncfusion Team May 12, 2020 05:00 AM UTC

Hi Rama, 

Thanks for the update. 

Sorry for the inconvenience. We have re-evaluated the problem at our end and found the cause for the reported problem is that you have missed to setting the height property for the Scheduler. Because the virtual scrolling is not working when we have the height as auto. So we suggest you kindly set the height property to the scheduler to overcome this issue and no need to change anything in your shared sample. For your reference, we have changed the code in your sample which can be downloaded from the below link. 

<ScheduleComponent 
            key="ProjectScheduleComponent" 
            timezone="America/New_York" 
            cssClass="timeline-resource-grouping" 
            width="100%" 
            height="650px" 
            created={onCreated} 
            readonly={true} 
            timeScale={{ enable: true, interval: 60, slotCount: 1 }} 
            currentView="TimelineWeek" 
            eventSettings={{ dataSource: data1 }} 
            group={{ resources: ["Projects", "Agents"] }} 
        > 


Regards, 
Vengatesh  



RA Rama May 12, 2020 12:35 PM UTC

Hi Vengatesh,

I can see that layout issue is fixed when I set height but when I scroll .. browser seems to be getting stuck. That is a separate problem.

But can you please suggest, how do you want me to handle following scenario -

In real world .. It is not realistic to load all the events for all dates from server.

That is why I have created a stub method "refreshData" that simulates data loading from api - every time I get "dateNavigate" OR "viewNavigate" event.

What change will you recommend to make if we cannot pre-load entire data.


RA Rama May 12, 2020 01:21 PM UTC

Hi Vengatesh,

I updated my sample code by now keeping data ready before component renders - Still Weekly view is causing perf issues - 

Something is not right - I can see that it keeps getting stuck when i click "Weekly". I have attached sample I am referring to - Can you please suggest what am I missing in "report.js" and "reportRenderer.js" - Please use attached sample for optimization

Firefox infact reports it whenever I navigate to weekly view.



Attachment: Sample_b2414b1e.zip


RA Rama May 12, 2020 02:07 PM UTC

Hi Vengatesh,

I think I am understanding what is causing performance degradation - 

In the sample I sent you - Just remove - "timezone="America/New_York" and see the performance gain of "weekly view" and add it again and you will experience the performance degradation.

Try it on your local instead of stackblitz.


VM Vengatesh Maniraj Syncfusion Team May 13, 2020 02:36 PM UTC

Hi Rama, 

Thanks for the update. 

We have check the performance issue with your shared sample and we have considered this as defect and logged the below defect report at our end. We will fix the issue and include the solution in our upcoming patch release. We appreciate your valuable patience until then. 


Regards, 
Vengatesh  



RA Rama May 18, 2020 12:58 AM UTC

Hi Vengatesh,

Thank for handling this. Can you suggest any ETA for this fix.


VM Vengatesh Maniraj Syncfusion Team May 18, 2020 06:39 AM UTC

Hi Rama, 

Sorry for the inconvenience. 

Currently, we are working with performance improvements at our end and we will include the changes in our Volume 2 main release which is scheduled to be rolled on June 29, 2020. We appreciate your valuable patience until then. 

Regards, 
Vengatesh  


Loader.
Up arrow icon