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

MkDocs build is slow #1397

Open
StevenMaude opened this issue Nov 29, 2023 · 1 comment
Open

MkDocs build is slow #1397

StevenMaude opened this issue Nov 29, 2023 · 1 comment

Comments

@StevenMaude
Copy link
Contributor

StevenMaude commented Nov 29, 2023

This doesn't matter too much for an actual build during deployment, but is inconvenient for local editing.

This is primarily due to the use of the multirepo plugin. It takes over 10 seconds on my computer, which is a little bit slow when you're editing and wanting quick feedback on appearance. It used to take something like 1-2 seconds.

It apparently wants to clone the project every time you edit files; upstream issue: jdoiro3/mkdocs-multirepo-plugin#129.

Other non-ideal workarounds for local editing:

  • remove the ehrQL section entirely when not working on it
  • edit the repository URL to point to a local clone

#1317 might help here.

@StevenMaude StevenMaude changed the title MkDocs build is slow when editing files MkDocs build is slow Nov 29, 2023
@StevenMaude
Copy link
Contributor Author

StevenMaude commented Nov 30, 2023

  • remove the ehrQL section entirely when not working on it

Specifically, what you'll have to do in mkdocs.yml:

  • comment out the !import line that actually uses the multirepo plugin
  • comment out the ehrql/stylesheets/extra.css line under extra_css
  • comment out the hooks/ehrql_css.py line under hooks

and avoid accidentally committing/pushing these changes.

Little bit irritating. But this cuts the rebuild time on edit back down from 10-15 seconds to 2 seconds for me, while editing the main 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

No branches or pull requests

1 participant