Improve table column resize performance #13097
Labels
package:table
squad:collaboration
Issue to be handled by the Collaboration team.
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
📝 Provide a description of the improvement
When I was researching performance problems with loading data, I stumbled upon table column resize. The plugin is written in the way that it is very non-performant. The initialization takes a lot of time. For some samples, it crashes with
Maximum call stack size exceeded
(and it surely shouldn't the sample wasn't that big). For other, it was heavily slowing down the data load (init and paste).Right now, whenever view is rendered (after every character type, for example) we go through the whole view document tree and check whether some cells are missing a resizer. It's even worse, because whenever we find such cell, we add the resizer ... triggering another render, so we go again... This is why this caused a crash for pasting a huge table but it would also hinder editor UX when there is a lot of content (even with no tables!).
Since we don't have a nice way to check what changed in the view (or I don't remember such way), for efficiency purposes, I propose to add those UI elements on downcast instead. I already wrote a proposal for a solution but I didn't test it thoroughly.
Steps to do are:
The text was updated successfully, but these errors were encountered: