slidev
slidev copied to clipboard
perf: virtual scroll for overview and quick overview
Fixes slow loading and scrolling for large presentations
Deploy Preview for slidev ready!
| Name | Link |
|---|---|
| Latest commit | 9d3d1e0b07228d9b93825b10b62445229453fdac |
| Latest deploy log | https://app.netlify.com/sites/slidev/deploys/66fd770d0951ef0008b4f6cf |
| Deploy Preview | https://deploy-preview-1610--slidev.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thanks for your contribution!
There is a problem that the height of the rows is calculated dynamically, but the itemHeight given to useVirtualList is a static value. I am not very sure on this.
There is a problem that the height of the rows is calculated dynamically, but the
itemHeightgiven touseVirtualListis a static value. I am not very sure on this.
Fixed.
Don't merge yet, fixing something
Ok, that's all
I am not very sure about this - after this PR, every time you open up the overview, every slide gets re-initiated, which they are supposed to be cached.
If perf/memory is really a concern, I'd suggest we take a screenshot of the final slide and place the overview with that image (with an option to opt-in/out) so we don't duplicate slides rendering and would be a lot more performant than virtual scroll.
If you need a large presentation for testing try: https://gitlab.vegova.si/rkv/prosojnice
@antfu Are you sure the slides are not getting cached? It seems to me they are: the loading component only shows the first time the page is opened