Skip to content

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

Merged
pawamoy merged 1 commit into
mkdocstrings:masterfrom
oprypin:mtime
Dec 23, 2020
Merged

Disable Jinja's auto_reload, to reduce disk reads#200
pawamoy merged 1 commit into
mkdocstrings:masterfrom
oprypin:mtime

Conversation

@oprypin

@oprypin oprypin commented Dec 22, 2020

Copy link
Copy Markdown
Member

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.

@pawamoy pawamoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@pawamoy pawamoy merged commit 3b28c58 into mkdocstrings:master Dec 23, 2020
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