Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Performance in Row Grouping #924

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bkorobeinikov
Copy link

@bkorobeinikov bkorobeinikov commented Mar 15, 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

related to #823

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.

None yet

1 participant