Skip to content

refactor(*): further improvements to core and grids/core#16742

Open
kdinev wants to merge 22 commits intomasterfrom
opus-mep-refactor
Open

refactor(*): further improvements to core and grids/core#16742
kdinev wants to merge 22 commits intomasterfrom
opus-mep-refactor

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Jan 13, 2026

Closes #

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD
  • Refactoring

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@kdinev kdinev requested review from Copilot and damyanpetev January 26, 2026 13:06
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 refactors the core and grids/core modules by reorganizing grid navigation constants and the yieldingLoop utility function to improve code organization and reduce coupling between the core and grids packages.

Changes:

  • Moved grid-specific navigation key constants from core/utils.ts to grids/core/grid-navigation-keys.ts
  • Moved yieldingLoop function from core/utils.ts to grids/core/exporter-common/yielding-loop.ts
  • Updated all import statements across affected files to reference the new locations
  • Removed unused setImmediate.ts file from core package
  • Updated zone.js dependency from ~0.15.0 to ~0.16.0

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pivot-grid-navigation.service.ts Updated imports to use grid-specific navigation keys from grids/core
hierarchical-grid-navigation.service.ts Updated imports to use SUPPORTED_KEYS from grids/core
public_api.ts (grid) Added export for grid-group-by-area component
group-by-area.component.html New file containing template for group-by-area component
grid-group-by-area.component.ts Updated imports to consolidate from grids/core
grid.pipes.ts Changed let to const for immutable result variable
grid.component.ts Moved IgxGridGroupByAreaComponent import to local file
grid-base.directive.ts Removed IgxGridGroupByAreaComponent from grids/core import, added local import
yielding-loop.ts New file containing extracted yieldingLoop utility function
base-export-service.ts Updated import to use local yieldingLoop
excel-files.ts Updated import to use local yieldingLoop
char-separated-value-data.ts Updated import to use local yieldingLoop
public_api.ts (grids/core) Added export for grid-navigation-keys, removed grid-group-by-area component export
grid-navigation.service.ts Updated imports to use grid-navigation-keys module
grid-navigation-keys.ts New file containing grid-specific navigation key constants
grid-mrl-navigation.service.ts Updated imports to use grid-navigation-keys module
utils.ts (core) Removed grid-specific constants and yieldingLoop function, removed setImmediate import
setImmediate.ts Deleted file as it's no longer used
accordion.component.ts Moved ACCORDION_NAVIGATION_KEYS constant to local definition
package.json Updated zone.js dependency version

callback(i);
}
if (i < count) {
setTimeout(chunk, 0);
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The original implementation used setImmediate for scheduling, which provides better performance characteristics than setTimeout(0) by using the microtask queue. Consider documenting why the change to setTimeout was made, or evaluate if this change impacts export performance for large datasets.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@gedinakova Can you look at this comment and if it correctly reflects a performance impact, I will ask it to revert it back to setImmediate.

Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the unit test I tried the two within, the setImmediate definitely gives a way better performance:
Chrome Headless 143.0.0.0 (Windows 10) LOG LOG: 'setTimeout(0) completed in: 986.60ms'
Chrome Headless 143.0.0.0 (Windows 10) LOG LOG: 'setImmediate completed in: 2.40ms'.

I vote for going back to setImmediate.

@kdinev
Copy link
Member Author

kdinev commented Feb 2, 2026

@copilot Based on the following comment: The original implementation used setImmediate for scheduling, which provides better performance characteristics than setTimeout(0) by using the microtask queue. Consider documenting why the change to setTimeout was made, or evaluate if this change impacts export performance for large datasets. revert back to using setImmediate and place it under the appropriate entry point.

Copy link
Contributor

Copilot AI commented Feb 2, 2026

@kdinev I've opened a new pull request, #16842, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 6 commits February 2, 2026 10:29
@kdinev
Copy link
Member Author

kdinev commented Feb 5, 2026

@copilot Add a migration for the moved export of the GroupByAreaComponent for version 21.1.0. Look at the migration in 21.0.0 for reference.

Copy link
Contributor

Copilot AI commented Feb 5, 2026

@kdinev I've opened a new pull request, #16870, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 5, 2026 13:36
…to grids/grid

Co-authored-by: kdinev <1472513+kdinev@users.noreply.github.com>
[WIP] Refactor core and grids/core for further improvements
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.

5 participants