-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Performance: Full virtualization of the mosaic view #3436
base: develop
Are you sure you want to change the base?
Conversation
Looks amazing. We'll test it when are back in our office. Let us know when you think this is ready to be merged! |
@lastzero will do. Now the only things missing are
|
update: viewer-prev/next-bug is fixed |
My understanding is that this should first be tested on more devices, in particular iOS, before it's safe to be merged into develop? |
That is correct |
I found a small bug with these changes where when you scroll to the bottom of the currently loaded pictures super fast, the infinite-scroller seems to not always recognize that the end of the list was reached. If this happens, the next batches are only loaded once you scroll the tiniest but upwards. This does not happen when not scrolling super fast, presumably because the infinite scroller isn't missing any events in that case |
When you are ready, I'd be happy to merge this as well. |
Not yet. Let me fix this last bug mentioned here first, and let me do some performance tests on different devices first. |
Any updates? |
This updates the pseudo-virtualization of the mosaic view with a real virtualization.
This increases scroll-performance yet again (less blinking, faster loading), while decreasing memory usage.
The effect should be especially noticeable when scrolling through a lot of images on a small screen.
The virtualization is implemented by measuring the size of the first Element using a ResizeObserver and assuming, that all other elements have the same size and no spacing inbetween.
This has not yet been tested on iOS devices yet.
There is a known bug on Firefox, that the number of columns is off by 1 on certain resolutions. I highly suspect that that is because of the non-integer widths of the columns on most screen-sizes. Because the position-calculations are simple JS, it's probably the size reported by the ResizeObserver. Will fix that laterFixed it
There is a known bug where often when opening a photo, and using the left/right arrows to switch between images, the wrong images are shown. This is strange, because the viewer opening logic isn't touched in this PR. Will try to find the cause and fix it soon.Fixed it
Performance comparison
Scrolling through 1400 images on a smartphone-sized screen
before
after
Acceptance Criteria: