-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Limitted count of elements #60
Comments
@pawelzwronek This is great issue, thank you for raising it. I can confirm that 33,554,428 pixels is the dimensional limit for the Chrome browser. Other browsers have similar limitations. So, we can’t use a viewport exceeding 33,554,428 pixels. Specifically, I'm talking about 2 fwd/bwd empty elements (data-padding-forward/data-padding-backward) that emulate virtualization: https://github.com/dhilt/vscroll/wiki/Viewport. I see 2 general solutions:
That said, this would be a major change, and right now I can’t estimate how much effort it might take. |
The first solution seems straightforward, and I would personally give it a try. However, one potential issue is that the parent element might also be limited to 33,554,428 pixels. The second solution is a bit unclear to me, but I’m not as familiar with the code/architecture as you are. In any case, I’m looking forward to the fix so I can apply it to my project. 😀 |
Another issue I've noticed in Firefox and I'm not sure but it may be related to this issue. In the demo project, when I set the settings in settings: {
minIndex: 0,
maxIndex: 800000,
sizeStrategy: 'constant',
}, then the vertical scrollbar change it's height to very big as there would be just few elements. Setting |
I checked the 1st approach (splitting 1 big virtual element into a set of smaller elements) and it doesn't work. Of course, that's because the scrollable wrapper remains the same. So the scrollable area can't be larger than 33,554,428px. This means that another approach should be taken, the one I called virtualization within virtualization. It's about scaling the viewport so that the viewport size never exceeds, say, 10kpx, but each pixel is a virtualization of N pixels, where N is rational, >= 1, and depends on the real dimensions. This should take time... |
That's unfortunate my guess of limited size of the parent was correct, but thanks for testing it. |
Hi!
I've found an issue when there is too many elements to be displayed. I think it's chrome related implementation limit.
When I try to display 3.000.000 elements 13px of height each then VScroll breaks. A height of the scrolled element (div in my situation) should be set to 39000000px but it's 3.35544e+07px at most. This makes
viewport size has not been changed
to appear in the log when I try to scroll to some far position and nothing is displayed. There is alsoerror: Can't set buffer items
in the log.The text was updated successfully, but these errors were encountered: