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

Disable Jinja's auto_reload, to reduce disk reads #200

Merged
merged 1 commit into from Dec 23, 2020

Conversation

@oprypin
Copy link
Member

@oprypin oprypin commented Dec 22, 2020

Any time a template is referenced, even though it's cached in memory, Jinja ends up doing a filesystem access, to check whether the template file has been modified and so would need to be recompiled.
But it's not even useful to be able to modify a template file on disk in the middle of a mkdocs build.

An equivalent change to MkDocs itself proved to improve performance significantly. I can't say the same about mkdocstrings, as its templates aren't as nested, but it'll still help. And just good for consistency now.

Any time a template is referenced, even though it's cached in memory, Jinja ends up doing a filesystem access, to check whether the template file has been modified and so would need to be recompiled.
But it's not even useful to be able to modify a template file on disk in the middle of a mkdocs build.
Copy link
Member

@pawamoy pawamoy left a comment

👍

@pawamoy pawamoy merged commit 3b28c58 into mkdocstrings:master Dec 23, 2020
13 checks passed
13 checks passed
quality
Details
tests (ubuntu-latest, 3.6)
Details
tests (ubuntu-latest, 3.7)
Details
tests (ubuntu-latest, 3.8)
Details
tests (ubuntu-latest, 3.9)
Details
tests (macos-latest, 3.6)
Details
tests (macos-latest, 3.7)
Details
tests (macos-latest, 3.8)
Details
tests (macos-latest, 3.9)
Details
tests (windows-latest, 3.6)
Details
tests (windows-latest, 3.7)
Details
tests (windows-latest, 3.8)
Details
tests (windows-latest, 3.9)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants