-
Notifications
You must be signed in to change notification settings - Fork 158
Perf. improvements with activation and cell merge. #16251
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
base: 20.1.x
Are you sure you want to change the base?
Conversation
@dkamburov First one, I was not able to reproduce: Are you sure you have the latest changes in the branch or are there any additional steps needed to reproduce? Second one is a sample issue. Because of the way the data is added, the same object refs are used in the grid sample:
Hence, duplicate keys. I fixed it in the sample. |
@MayaKirova appologize on the non reproducible sample: I do had some changes on that sample(didn't noticed them at first as they were from my previous testing on the cell merging):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional, issues I found:
- If you click on any of the headers in the dev sample an error is thrown.

- Go to the performance project and enable the merging on all columns. Run the performance samples using
npm run start:performance
and go to the grid with 1 million records. Sort thePosition
column. Click on the first cell of theRegistered
column. An error is thrown with maximum callstack exceeded.

activeRowIndexes = activeRowIndexes.map(x => x - this.grid.pinnedRecordsCount); | ||
} | ||
const result = DataUtil.merge(cloneArray(collection), colsToMerge, mergeStrategy, activeRowIndexes, this.grid); | ||
activeRowIndexes = activeRowIndexes.filter((val, idx, arr) => arr.indexOf(val) === idx).filter(x => !isNaN(x)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only removing the duplicates can we use a set? Probably, it would be too much of a work to refactor everywhere activeRowIndexes
is used but you can use it here like :
Array.from(new Set(activeRowIndexes)).filter(x => !isNan(x));
} | ||
}); | ||
}); | ||
const uniqueRoots = rootsToUpdate.filter((val, idx, arr) => arr.indexOf(val) === idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootsToUpdate
can be a Set here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are applied and issues should be solved. The performance comments is up for discussion I guess.
Closes #16146
Split pipes in two, where one does the merging and the other tracks active rows and unmerges within related merge sequences.
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)