Skip to content

Conversation

SISTF
Copy link
Contributor

@SISTF SISTF commented Aug 5, 2025

This is an attempt to improve filtering and sorting on larg datasets.

This is a first attempt to solve #195

This commit introduces a major refactor and optimization of the TableView filtering and sorting logic to address severe performance issues with large datasets (500,000+ rows).

Unified fast code path for sorting and filtering, used by both header clicks and options flyout, ensuring consistent and optimal performance.
Parallelized filtering and sorting using chunked processing and ConcurrentDictionary for thread safety and speed.
Smart caching of unique filter values, with cache keys that include filter state, to avoid unnecessary recomputation.
Scroll position preservation: The horizontal scroll position is now reliably preserved and restored during data operations, eliminating UI jumps.
Improved blank/null value handling in filters, ensuring consistent user experience.
API additions: Added ApplyUnifiedSort and ClearUnifiedSort to IColumnFilterHandler for unified, fast sorting from any UI entry point.
Error handling and thread safety: Added guards against infinite loops, race conditions, and UI glitches during data operations.
These changes dramatically reduce the time required for filtering and sorting on very large datasets, making TableView responsive and usable at scale.

My tests resulted in significant improvements, so i made it ready to review and test or discuss further.

This is an attempt to improve filtering and sorting on larg datasets.

This is a first attempt to solve w-ahmad#195
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.

1 participant