Repository navigation
Docs: keep the source record pages out of the navigation tree - #44
Merged
Merged
Conversation
Sphinx copies the whole navigation tree for every page it writes, and the theme's sidebar asks for it on nearly every page. With 763 source records in a hidden toctree that took 177 s of a 271 s profiled build (about 35 million node copies), most of the build's time and most of its length on Read the Docs. The record pages are now orphans, reached through the alphabetical index. Their URLs and search entries stay. They lose the sidebar and previous and next links. The local build without the gallery goes from 164 s to 39 s. The setting in conf.py that narrowed the record pages' sidebar goes with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Six builds on Read the Docs took 230 to 341 s, against about 600 s before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
Contributor
Author
|
Read the Docs: 6 of 6 builds of this tree passed, at 230 to 341 s, on the unchanged config that had passed 0 of 10 since 30 October. Details are on #40. A later commit changes only the changelog fragment, from "about a third" to "less than half", because the whole build fell from about 600 s to a mean of 257 s. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #40. This shortens the build a lot, but it does not explain the stalls, so it leaves #40 open until builds show the result.
What changed
The 763 source record pages are now
:orphan:, reached through the alphabetical index instead of a hidden toctree. Theconf.pysetting that narrowed their sidebar is removed, because they no longer have one.Readers: URLs and search entries are unchanged. Record pages lose the sidebar and previous and next links, and keep the top navigation and their link to the catalogue.
the-data/sources.htmldrops from 125 KB to 33 KB, because it no longer lists 829 sidebar entries.Why
Sphinx copies the whole navigation tree for every page it writes. A profile of a full build, on an Apple Silicon Mac at
c63a648, without re-running the gallery:generate_toctree_htmlThat is about 35 million node copies, nearly all for records the sidebar then hides.
Unprofiled builds, same machine, also without re-running the gallery:
collapse_navigationacross the whole manual-j 2, without this changecollapse_navigationwas rejected because it also changes the sidebar on every other page. The 62 s and 39 s runs ran side by side.Verification
uv run poe check: passed, 21539 passed, 1 skipped, 100% coverage, including a clean docs build with warnings as errors and the gallery executing.tests/test_source_catalogue.pynow requires that records are orphans and that the index holds no toctree.Not checked
🤖 Generated with Claude Code