Skip to content

Conversation

@bkorobeinikov
Copy link
Collaborator

@bkorobeinikov bkorobeinikov commented Mar 14, 2024

There is a performance bottleneck when using the row grouping feature. It is noticeable with a large number of rows and about >~20 groups or so.

Profiler showed that the call to mapRowIndexToPath during row height resolution takes most of the time, and it gets slower scrolling towards the end of the list.

rowIndex property was added to identify the exact position of the group in the list. This allowed to create a map that then could be looked up to identify whether the row is a group row or not and resolve the height accordingly, avoiding the expensive call to mapRowIndexToPath.

For further performance improvements, with rowIndex property functions like rowNumberMapperOut and mapRowIndexToPath could be changed to do a binary search, because mapRowIndexToPath can be used as mapper function in the getCellContent consumer code.

scrolling profiler recordings:

before change
image

after
image

@bkorobeinikov bkorobeinikov changed the title improve perf when getting rowHeight with grouping enabled Improve Performance in Row Grouping Mar 15, 2024
Copy link

@jfmaggie jfmaggie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants