Posted 14 September 2017, 11:49 am EST
Hi.
Recently we faced an issue when our FlexGrid instance used in Angular 1.5 application becomes unresponsive for a second when cell enters or exits edit mode. Profiling shows that a lot of time is spent on
refresh method invoked from _EditHandler.startEditing and _EditHandler.finishEditing handlers. Also we found that this refresh method completely removes ALL cells from the DOM and then renders them again. This process takes time, as we use custom cell templates in our grid. Taking into account that in average we have 10-15 columns and 20-30 rows in visible area of the grid, it disposes and renders from scratch 200-450 cells every time cell editor is displayed or removed.And this seems not very optimal, as visually just one cell changes (well, sometimes two when we have row header), all other cells remain the same (both text and css).
So the main question: how can we avoid complete re-rendering of the whole grid when cell enters and exits edit mode and refresh only cells that are affected by these events?
Of course when cell editing is finished, we might need to refresh the whole row, as there can be computed cells that depend on updated cell, but rendering one row will be ~20 times faster than rendering 20 rows.
Thank you.