Skip to content

perf: virtual scroll for overview and quick overview#1610

Draft
jakobkordez wants to merge 14 commits into
slidevjs:mainfrom
jakobkordez:feature/overview-virtual-list
Draft

perf: virtual scroll for overview and quick overview#1610
jakobkordez wants to merge 14 commits into
slidevjs:mainfrom
jakobkordez:feature/overview-virtual-list

Conversation

@jakobkordez

Copy link
Copy Markdown
Contributor

Fixes slow loading and scrolling for large presentations

@netlify

netlify Bot commented May 24, 2024

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 9d3d1e0
🔍 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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kermanx

kermanx commented May 24, 2024

Copy link
Copy Markdown
Member

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.

@kermanx

kermanx commented May 24, 2024

Copy link
Copy Markdown
Member

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.

Fixed.

@jakobkordez

Copy link
Copy Markdown
Contributor Author

Don't merge yet, fixing something

@jakobkordez

Copy link
Copy Markdown
Contributor Author

Ok, that's all

@kermanx kermanx changed the title Add virtual scroll for overview and quick overview perf: virtual scroll for overview and quick overview May 28, 2024
@antfu

antfu commented May 31, 2024

Copy link
Copy Markdown
Member

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.

@jakobkordez

Copy link
Copy Markdown
Contributor Author

If you need a large presentation for testing try: https://gitlab.vegova.si/rkv/prosojnice

@jakobkordez

Copy link
Copy Markdown
Contributor Author

@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

@jakobkordez jakobkordez marked this pull request as draft October 2, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants