search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Performance issue when adding/deleting entity in daypilot

Asked by Veronique
10 days ago.


We have some performance issue when we add or delete an entity.

We saw that when adding/removing one entity, daypilot deletes all the entities of the row, and redraw everything using the two methods ( _updateRowsNoLoad and _redrawInvalidatedCells).

This DOM manipulation is costly. Would it be possible to not delete/redraw entities when they are not changing?

Attached is the capture of a timeline - adding 1 entity.

Thank you for your time

1 other person also wants an answer.
Answer posted by Dan Letecky [DayPilot]
9 days ago.

Please hold on - the events.add() and events.remove() optimizations are in the works.

At this moment it redraws the full row because it's always safe (the added/removed event can affect row height and event positions). In some cases (if events don't overlap) it's possible to add/remove the target element without redrawing the row. In the updated implementation, this situation will be detected and the faster update method will be used if possible.

For events.update(), this optimization is already implemented but it needs to be enabled explicitly using "eventUpdateInplaceOptimization" property:

dp.eventUpdateInplaceOptimization = true;

It will use an in-place update of the target event DOM element if the event position and lenght remains the same.

Comment posted by Dan Letecky [DayPilot]
8 days ago.

The latest sandbox build (2840+) now includes optimization of events.add() and events.remove() as well. It is active when eventUpdateInplaceOptimization is set to true:

Let me know if there is any problem.

Comment posted by Veronique
8 days ago.

Thank you for you answers. We will try this new eventUpdateInplaceOptimization as soon as we can!

New Reply
This reply is
Your name (optional):