Our pure JavaScript Scheduler component


Post by info@xnew.it »

Hi Bryntum team,

I have a request about the optimization of my scheduler. When I have a lot of appointment my application became really really slow. There is any solution about that?

Thank you for your help!


Post by tasnim »

How many appointments (events) do you have in your application?


Post by info@xnew.it »

Hi Tasnim,
I can also have 150/200 event for day.

Attachments
Screenshot 2022-12-21 112842.png
Screenshot 2022-12-21 112842.png (245.99 KiB) Viewed 275 times

Thank you for your help!


Post by mats »

Can you please upload a sample dataset you use (without production data) so we can benchmark it?


Post by info@xnew.it »

OK thanks. I will do it.
Only a clarification. I've seen about optimization that whenever I set an event, there is a re-rendering of the component.
I can show you with a short video via a colo.log().

https://drive.google.com/file/d/1k7U_U3r1q7uMbb_QWpn4fGIqDkoyTAHs/view?usp=sharing

There is a way to stop that? I suspect this is the problem.

Thank you for your help!


Post by johan.isaksson »

Hi,

When you change a field on an event, it refreshes the schedule to reflect the change in the UI.

If you are changing multiple events and only want a single refresh, you can first suspendRefresh and then resumeRefresh. For example like this:

scheduler.suspendRefresh();

event1.startDate = ...;
event2.startDate = ...;
event3.startDate = ...;

// Passing true forces a refresh, if not suspended from elsewhere
scheduler.resumeRefresh(true);

Docs for it https://bryntum.com/products/scheduler/docs/api/Scheduler/view/Scheduler#function-suspendRefresh.

A common pitfall is changing events in a eventRenderer() function, triggering re-rendering during rendering. That should always be avoided.

Best regards,
Johan Isaksson

Post by info@xnew.it »

Hi Johan,

Thank you so much for your answer. I found a solution at my problem with your help.

Thank you for your help!


Post Reply