-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add Fast Mode for Documentation Builds #14267
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
Conversation
kevinjqliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. I had to take some time to understand mkdocs' behavior.
Feels like we're on the right path here. From my understanding, there are 2 major issues with building docs locally:
- nav.yml references all previous versions of the docs
- mkdocs automatically load all directories inside
docs/docs/anddocs/javadoc/
We can resolve (1) by overriding the nav component. We can resolve (2) by using exclude_docs to exclude all other versions.
I tested this out locally and was able to get build done in ~45 seconds.
Instead of replacing nav.yml (which is error-prone imo), I created a new mkdocs-dev.yml and references it in serve-dev.sh
I can push up my local changes if you want to take a look
|
@talatuyarer pushed up some of my local changes, as we discussed offline. Please take a look and see if this is also working for you locally 😄 |
supa fast! |
kevinjqliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
so much faster now
|
Thanks @talatuyarer ! |
| - Java: | ||
| - Nightly: '!include docs/docs/nightly/mkdocs.yml' | ||
| - Latest (1.10.0): '!include docs/docs/latest/mkdocs.yml' | ||
| - Other Implementations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether we can avoid copying other parts of mkdocs.yml. It will be easier to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, this is more of a short term solution. both nightly and latest are just sym links to the actual "latest version" (1.10).
long term i want to explore using mike for versioning
Every time we build the docs, the
mkdocs-monorepo-pluginrebuilds all 14+ versioned documentation of projects even though these old versions never change. This makes iterative development very slow.I created A development mode that only builds nightly and latest versions to make builds are fast. The production mode still builds all versions which means slow :)
Based on my machine performance it makes 5x more faster.
--dirtyflag makes even faster iterative rebuildsHow to use
Dev Mod
Full production mode
Closes #14124
cc @kevinjqliu @RussellSpitzer