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

Performance issues on table resize.

Asked by Anonymous
11 months ago.


"How can I improve the dynamic resizing of column widths in my sidebar, as seen in the video? It seems that as the number of appointments increases, there is a slight impact on performance. Any advice on how to enhance the handling, perhaps using EventBeforeDom is the issue?"




Answer posted by Dan Letecky [DayPilot]
11 months ago.

The calendar component doesn’t re-render events when the width changes. The resizing itself is fully handled by the browser (so there is nothing to optimize). Generally, it will take longer if the resized content is bigger.

However, the calendar watches for dimension and visibility changes. It updates measurements required for calculating proper position of some UI elements (especially when the scrollbar visibility changes as a result) and re-renders these elements when necessary. You can turn this auto-adjustment off using the watchWidthChanges property:

{
  watchWidthChanges: false,
  // ...
}

In React, you will need the latest sandbox build (version 2023.4.5810+) to change the value. This build also debounces the calculations and updates by 100ms so you may also see an improvement without turning it off.

To manually recalculate the necessary internal values after the resizing is complete, you can call the show() method.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.