Skip to content

UWP - Fix DataGrid scroll performance issues #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

adamplonka
Copy link
Owner

Fixes CommunityToolkit#2122

Fixes DataGrid scroll performance issue for large data sources.

PR Type

What kind of change does this PR introduce?

Bugfix

What is the current behavior?

The DataSource set in DataGridDataConnection class is (almost) always of type ICollectionView which implements generic IList<> but doesn't implement IList. This causes fallback to list enumeration to reach the current index..

current.mp4

What is the new behavior?

The fix adds support for ICollectionView DataSource and accesses the items directly by their index.
An approach for PagedCollectionView (from Silverlight) can be merged with the fix as it implements the same interface.

fixed.2.mp4

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

@adamplonka adamplonka merged commit dd00e87 into main Apr 13, 2023
@adamplonka adamplonka deleted the uwp-fix-scroll-performance branch April 13, 2023 20:55
@adamplonka adamplonka restored the uwp-fix-scroll-performance branch April 14, 2023 02:45
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.

Freeze when scrolling (when many records are loaded in the control)
1 participant