feat(cdk/table): cache cells when updating columns
Feature Description
When adding / removing rows to / from a DataSource the component tree is updated efficiently and only the rows that changed get rebuild (can be easily tested by logging something inside the ngOnDestroy lifecycle in a cell component).
However, updating the array of visible columns, destroys all rows and recreates all rows incl. all cells (see https://github.com/angular/components/blob/974d42f04ba4ea27662e429b3d0ddb2871329aa3/src/cdk/table/table.ts#L1067-L1098).
It would be super helpful for bigger tables where cells include components that are destroyed and re-created on column changes to cache and re-use existing cells. Meaning instead of clearing the view of each row, creating a diff of columns inside each row to only touch columns that actually changed (add new ones, remove old ones, move cells where the column was re-ordered).
Use Case
This would allow for more performance when working with bigger tables, without the need for some kind of virtual scrolling.
We are closing this issue, because we've determined, using a semi-automated process, that it is no longer relevant, has low engagement, or it does not have enough information to proceed. Feel free to comment if you think the issue should be reopened, or open a new issue with the latest version of our code instead.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.