-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Context
I noticed this issue while working on project where API docs are generated with mkdocstrings, while instant previews are enabled globally. These projects document their whole API (which is rather small) on a single page, resulting in quite a lot of instant previews on the page, mostly linking to the very same page.
Bug description
Upon serving docs with zensical serve and opening a page with lots of instant previews (mostly linking to the same page), I see my browser consuming huge amounts of memory (gigabytes), up to crashing my computer.
I was able to reproduce the issue on Firefox and Chrome, with or without the navigation.instant.prefetch feature, with or without globally enabled previews (the alternative being explicit ones using { data-preview }).
I wasn't able to reproduce the issue with Material for MkDocs. I don't see the issue either once the site is deployed on GitHub Pages. For example this page makes use of global instant previews: https://pawamoy.github.io/yore/reference/api/, yet no excessive memory use by the browser can be seen.
Related links
Reproduction
Steps to reproduce
- unzip, cd into
uv venv; uv sync; uv run zensical serve- go to localhost:8000, on the markdown page, while checking memory use
Browser
Firefox
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.