[GH #6420] Nested Rows Performance and Row Headers

Tags: #<Tag:0x00007fd2c1d83ee8> #<Tag:0x00007fd2c1d83da8>

Hello, after integrating the nested rows successfully, we have found out a couple of things.

jsfiddle -> https://jsfiddle.net/kewdz3yr/2/

  1. Slow performance on medium data, more then ~2 thousand rows, the issue lies in countAllRows
    the recalculations are made all the time when expanding/collapsing rows, and it recalculates, going through all the data. In the jsfiddle above if we call collapseAll it takes a very long time to load.
    We found a workaround, and we precalculate the rows count before we initialize the table.
    It would be nice if that would be cached or precalculated.
  2. When using collapseAll/expandAll , the functions calls this.collapseMultipleChildren(parentsToCollapse);/this.expandMultipleChildren(parentsToExpand);.
    That triggers a render on the entire table through this.renderAndAdjust();.
    And after collapse/expand, the function calls again this.renderAndAdjust();, so we have multiple renders in 1 flow, we also fixed that by calling expandMultipleChildren/collapseMultipleChildren with forceRender: false.
  3. Row Height headers don’t maintain the same height as the rows thus it seems broken. We are still trying to find a solution for that.

FYI: this is more of a feedback in case it was not reported, or not known.

Hey @martin

Issue 3 is fixed when you add autoRowSize: true https://jsfiddle.net/a1k2u853/

I will test issue 1 with static data and check if that changes anything + more simplified example.

When it comes to case 2, that is currently the only way to get this done. And that might be the cause of issue 1. Thank you for the suggestion with forceRender: false. I will investigate the issue further and gather results in a Github report.

I’ve build the example locally and tried to make some changes but nothing gave me better results. It was said that hiding columns slows down the performance but in this case the difference is not noticable.Surely some of the loading time is related to the JSON fetching but it also goes slow with local data.

As we use the trimRows in nestedRows I have left a note here https://github.com/handsontable/handsontable/issues/6420 to check those cases while fixing https://github.com/handsontable/handsontable/issues/6420

1 Like