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?
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!
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.