Skip to content
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

WinUI - Fix DataGrid scroll performance issue #4867

Open
wants to merge 1 commit into
base: winui
Choose a base branch
from

Conversation

adamplonka
Copy link

@adamplonka adamplonka commented Apr 12, 2023

Fixes #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

@ghost
Copy link

ghost commented Apr 12, 2023

Thanks PlonkaAdam for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker and azchohfi April 12, 2023 03:47
@ghost ghost added the DataGrid 🔠 Issues on DataGrid control label Apr 12, 2023
@adamplonka
Copy link
Author

@dotnet-policy-service agree

@adamplonka adamplonka closed this Apr 13, 2023
@adamplonka adamplonka deleted the winui-fix-scroll-performance branch April 13, 2023 20:55
@adamplonka adamplonka restored the winui-fix-scroll-performance branch April 14, 2023 02:46
@adamplonka adamplonka reopened this Apr 14, 2023
@Trolldemorted
Copy link

This PR has been open for half a year, could you either merge it or request changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataGrid 🔠 Issues on DataGrid control
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants