pydata-sphinx-theme
pydata-sphinx-theme copied to clipboard
Cache sidebar snippet in generated html pages
We have a library with lots modules, classes, and methods. The issue we're having is that the generated stubs for the class methods roughly takes up 1 GB of storage. I looked into it and it's because each html stub contains ~11k loc, 95% of which is the snippet that generates the sidebar. Is there a way to somehow cache this snippet to save space (also sphinx-build takes a significant time to generate the output)? Thank you!
This feels like a general sphinx problem instead of a pydata theme-specific one. Do you have more details about the site you are trying to build and the conf option you are using?
Btw, I have seen a report where the time to build is significantly reduced if you tweak the following two options:
- https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/configuring.html#control-the-number-of-navigation-levels
- https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/configuring.html#remove-reveal-buttons-for-sidebar-items
@ma-sadeghi did you try building your documentation with a differnet theme to check if the issue is coming from pydata-sphinx-theme or Sphinx itself ?
Thank you for all your replies. I haven't tried a different theme, but I agree that this is a general sphinx issue, so feel free to close it if you want to keep the issue tracker clean.