Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit navigation_depth to 4, fixes #56 #89

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

rkent
Copy link
Contributor

@rkent rkent commented Apr 2, 2024

Fixes #56

The html_theme_option 'navigation_depth' has a large impact on the size of the generated output. This patch changes that from infinite (-1) to 4.

Size effects for rmf_utils iron:
depth = 2: 60M
depth = 3: 61M
depth = 4: 112M
depth = -1: 332M

With depth = 4, the C++ API section in the toc shows like:
C++ API
--Full C++ API
----Classes and Structs
------Class LazyExpression

That is, the toc shows the class name, but not any details of the class. You need to click on the name to reach the class page to get that.

I think that is the right amount of detail, plus it is reducing the total file space to 1/3 of the current value.

@rkent rkent requested review from audrow and tfoote as code owners April 2, 2024 05:11
Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great to bring the disk space usage way down and also makes the navigation a little less cluttered. I see the collapse_navigation is False though the navigation seems to collapse by default now. But everything is still completely navigable. local testing on rclcpp took it from 1.6GB to 444MB on my machine.

@tfoote tfoote merged commit ed18fa2 into ros-infrastructure:main Apr 2, 2024
2 checks passed
@tfoote
Copy link
Member

tfoote commented Apr 2, 2024

Also side note it cuts the build time down to close to a third of the time as well for rclcpp. From 31 to 12 minutes
image

@rkent rkent deleted the limit-navigation-depth branch April 2, 2024 21:16
rkent added a commit to rkent/rosdoc2 that referenced this pull request Apr 3, 2024
tfoote pushed a commit that referenced this pull request Apr 10, 2024
* Clarify directory naming

* Refactor to write directly into wrapped directory

* Add basic c++ test with custom conf.py

* Create wrapped_sphinx_directory with an absolute path

* Limit navigation_depth to 4 (#89)

* Include user documents

* Copy all contents of /doc

* Fixups to match with refactor-sphinx-directories

* Fix flake errors, use dir/ instead of doc/dir titles

* Add tests for documentation
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.

Generated content uses a lot of disk space for a small subset of packages.
2 participants