Skip to content

DataGrid - Performance is slow if a large number of summaries is used (T1316562)#32921

Open
dmirgaev wants to merge 6 commits intoDevExpress:26_1from
dmirgaev:26_1__T1316562_summary_perf
Open

DataGrid - Performance is slow if a large number of summaries is used (T1316562)#32921
dmirgaev wants to merge 6 commits intoDevExpress:26_1from
dmirgaev:26_1__T1316562_summary_perf

Conversation

@dmirgaev
Copy link
Contributor

No description provided.

@dmirgaev dmirgaev self-assigned this Mar 16, 2026
@dmirgaev dmirgaev requested a review from a team as a code owner March 16, 2026 09:51
Copilot AI review requested due to automatic review settings March 16, 2026 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves DataGrid group summary performance by avoiding repeated columnsController.columnOption(...) lookups when many summary items are configured (T1316562), replacing them with a precomputed column lookup Map.

Changes:

  • Added a cached column lookup map built once per group-items processing cycle and reused during summary cell calculation.
  • Introduced internal summary types (SummaryItem, ColumnMap) and a small map lookup helper.
  • Added Jest unit + integration coverage for the new utilities and the performance optimization.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/data_grid/summary/utils.ts Adds getColumnFromMap helper for map-based column lookup.
packages/devextreme/js/__internal/grids/data_grid/summary/types.ts Adds internal SummaryItem and ColumnMap typings for the optimization.
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts Builds and reuses a column lookup map to reduce repeated columnOption calls during group summary rendering.
packages/devextreme/js/__internal/grids/data_grid/summary/tests/utils.test.ts Adds unit tests for getSummaryCellIndex and getColumnFromMap.
packages/devextreme/js/__internal/grids/data_grid/summary/tests/m_summary.integration.test.ts Adds an integration test asserting fewer columnOption calls on refresh with many group summaries.

@Alyar666 Alyar666 self-requested a review March 17, 2026 07:26
@dmirgaev dmirgaev force-pushed the 26_1__T1316562_summary_perf branch from dc1d23a to 357f2bd Compare March 18, 2026 06:08
Copilot AI review requested due to automatic review settings March 20, 2026 06:23
@dmirgaev dmirgaev force-pushed the 26_1__T1316562_summary_perf branch from 357f2bd to e00afd1 Compare March 20, 2026 06:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a column lookup map to speed up DataGrid group summary processing when many summary items are configured, reducing repeated columnOption lookups during group row rendering/refresh.

Changes:

  • Added a ColumnMap lookup mechanism and helper (getColumnFromMap) to avoid repeated columnOption calls.
  • Implemented _buildColumnLookupMap() and routed group summary cell calculation through the map.
  • Added Jest unit tests for summary utils and an integration test to validate the optimization behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/data_grid/summary/utils.ts Adds getColumnFromMap helper for map-based column resolution.
packages/devextreme/js/__internal/grids/data_grid/summary/types.ts Introduces SummaryItem and ColumnMap types used by the optimization.
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts Builds/passes a column lookup map into group summary cell calculation to reduce columnOption calls.
packages/devextreme/js/__internal/grids/data_grid/summary/__tests__/utils.test.ts Adds unit coverage for getSummaryCellIndex and getColumnFromMap.
packages/devextreme/js/__internal/grids/data_grid/summary/__tests__/m_summary.integration.test.ts Adds an integration test asserting fewer columnOption calls on refresh with many summaries.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants