Skip to content

refactor(grids): restore setImmediate for export performance#16842

Merged
kdinev merged 3 commits intoopus-mep-refactorfrom
copilot/sub-pr-16742
Feb 2, 2026
Merged

refactor(grids): restore setImmediate for export performance#16842
kdinev merged 3 commits intoopus-mep-refactorfrom
copilot/sub-pr-16742

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

The yieldingLoop utility used in grid exporters was changed from setImmediate to setTimeout(0), causing ~400x performance degradation (986ms vs 2.4ms in benchmarks) for large dataset exports.

Changes

  • Restored setImmediate.ts: Added the core-js implementation to projects/igniteui-angular/grids/core/src/ to provide efficient message queue scheduling
  • Updated yielding-loop.ts: Reverted from setTimeout(chunk, 0) to setImmediate(chunk) for chunk scheduling
// Before (slow macrotask queue)
if (i < count) {
    setTimeout(chunk, 0);
}

// After (fast message queue)
if (i < count) {
    setImmediate(chunk);
}

This restores the original performance characteristics for CSV/Excel exports with large row counts.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 2, 2026 10:29
…ldingLoop

Co-authored-by: kdinev <1472513+kdinev@users.noreply.github.com>
Co-authored-by: kdinev <1472513+kdinev@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor core and grids for further improvements refactor(grids): restore setImmediate for export performance Feb 2, 2026
Copilot AI requested a review from kdinev February 2, 2026 10:30
@kdinev kdinev marked this pull request as ready for review February 2, 2026 13:49
@kdinev kdinev merged commit 3a46762 into opus-mep-refactor Feb 2, 2026
@kdinev kdinev deleted the copilot/sub-pr-16742 branch February 2, 2026 13:50
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.

2 participants