pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Cache sidebar snippet in generated html pages

Open ma-sadeghi opened this issue 2 years ago • 2 comments

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!

ma-sadeghi avatar Mar 22 '22 13:03 ma-sadeghi

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

damianavila avatar Apr 04 '22 16:04 damianavila

@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 ?

12rambau avatar Sep 26 '22 16:09 12rambau

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.

ma-sadeghi avatar Oct 23 '22 00:10 ma-sadeghi