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

Speed up documentation build #1525

Merged
merged 6 commits into from
Nov 22, 2024
Merged

Speed up documentation build #1525

merged 6 commits into from
Nov 22, 2024

Conversation

matt-graham
Copy link
Collaborator

Resolves (some of) #1513

  • Remove linkcheck step
  • Removes -f force option to sphinx-apidoc and -E fresh env default argument to sphinx-build
  • Removes sphinx.ext.viewcode extension
  • Stops last updated date text being added to footers to minimize diff noise
  • Changes maximum resource file size before switching to just including a placeholder page linking to file to download rather than rendering table to 32KiB rather than 1MiB - this was a quicker alternative to suggestion in Speed up documentation generation #1513 to use an online viewer. This would still be nice to have but as a lot of resource files are still XLSX can be delayed till we have finished with converting them to CSV.

Times for tox -e docs steps before and after changes (in both cases from a clean state):

Step Time (master) / s Time (this PR) / s
Setup 8.89 8.06
sphinx-apidoc 0.31 0.29
tlo_methods_rst.py 7.51 7.51
tlo_data_sources.py 0.34 0.37
tlo_contributors.py 0.06 0.06
tlo_publications.py 0.38 0.42
tlo_resources.py 8.17 1.18
hsi_events.py (RST) 6.95 7.01
hsi_events.py (CSV) 7.75 7.00
tlo_parameters.py 4.95 5.10
sphinx-build 216.90 39.63
linkcheck 720.06 (removed)
Total 982.26 76.63

Biggest gain is removing linkcheck step but sphinx-build step is also significantly reduced, mainly because of previously some of the large resource files taking a while to render.

@matt-graham matt-graham requested a review from tamuri November 22, 2024 10:58
Copy link
Collaborator

@tamuri tamuri left a comment

Choose a reason for hiding this comment

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

Thanks - much better!

@matt-graham matt-graham merged commit 5eb5775 into master Nov 22, 2024
62 checks passed
@matt-graham matt-graham deleted the mmg/speed-up-docs-build branch November 22, 2024 13:52
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.

2 participants