-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Data virtualization is no longer supported after preview4 #11641
Comments
I am not sure if hack with int.MaxValue length is was intended to be supported. |
We don't need int. MaxValue so much, we only need to give a larger data to find that there is a big difference between preview4 and later versions. In preview4, Listbox will only get the data displayed on the current page from IList, and then in the preview4 version No matter how much data Listbox currently displays, it will get all the data of IList. You can see the demo I submitted, which has examples of two versions. |
To add, there is already a problem with the preview7 version |
Listbox virtualization seems to fail after preview4??? |
From what I observed, Listbox is obviously virtualized, no matter how many items in the collection, the ListBoxItem in logic tree remains the same. |
@emmauss I think knowing all items count shouldn't be required for uniform snap points. |
VirtualizingStackPanel doesn't use the items count to compute both regular snap points, only irregular snappoints require items. By default, snappoints are irregular. If they are certain all items are uniform, they would have to set either AreVerticalSnapPointsRegular or AreHorizontalSnapPointsRegular to true |
@emmauss I tried to do so but then items are misplaced. Offset errors are accumulated. |
This is actually due to the new renderer which uses float precision. If you look at the position of the items in DevTools, they're laid out at the correct position because the layout system uses double precision. However because our compositing renderer is based on I think we may need a separate virtualizing panel for large lists which uses logical non-smooth scrolling so that we don't hit this issue, or maybe we can switch to double precision in the renderer - @kekekeks would have thoughts on that. (As a clarification - this is a response to the "items are misplaced" part of this issue, not the data virtualization part) |
Ok, after discussing this with @kekekeks we're going to see if we can make the renderer work with double precision before 11.0 final. |
Is there any workground that can solve this problem in rc1 version? I hope to display a large amount of data in the listbox. The current estimated number is 1000w pieces of data. |
@jim-jiang-github I think the "easiest" workaround for now is pagination in the VM. May not be most convinient, but the fix we have in mind is not that straight forward afaik. for example: https://github.com/reactivemarbles/DynamicData#virtualisation |
Some GPUs don't support double precision at all and I believe this is an important reason why W.UI.C chose float precision. |
@emmauss regarding the data virtualization, it's not great default behavior that the default value for |
WinUI have both |
With how many items the issue becomes visible? |
It's not about precision supported by GPU, it's about calculations where values cancel each other out. The most simple case would be:
So when the
Assuming the offsets are integers and 96DPI, the loss of precision starts at 2²³ (8388608) pixels. It takes more for it to become noticeable. |
You can see a similar issue with web browsers, e. g. <div>
<div style="margin-top: 57000000px; width: 100px; height: 10px; background:red" ></div>
<div style="margin-top: 10px; width: 100px; height: 10px; background:blue" ></div>
</div> |
Describe the bug
It seems that data virtualization is no longer supported after preview4? Similar to using the IList interface to implement data virtualization in Wpf. I wrote a demo to implement data virtualization and display very, very, very large amounts of data.
Is there a new way to implement the function of data virtualization after preview4?
To Reproduce
Mini repo
data_virtualization.zip
Expected behavior
Can support data virtualization in preview7
Screenshots
IList Can support in preview4 like this:
bandicam.2023-06-04.13-40-28-606.mp4
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: