Jinja2 auto_reload left at its True default in production, where Flask had it False
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, performance
Research direction
Start in web/template_config.py and inspect how the existing debug flag is made available to template configuration. Set Jinja2 auto_reload from that flag, then verify that production disables reload while debug mode preserves it; the change is done when the configuration no longer performs the unnecessary production stat checks.
Written by the indexing model from the issue text.
Description
Jinja2's auto_reload defaults to True, and web/template_config.py does not override it. Flask's production default was False (it tracked app.debug, which was never set true pre-port), so this is a port-introduced behaviour change.
Effect: an extra stat() per template per render, forever, in production.
Caveat — this is a performance nit, not a bug, and a small one. For a self-hosted single-user-ish app the cost is genuinely marginal, and I would not raise it on its own. It is filed because it is invisible: nothing surfaces it, it will never fail a test, and it is the kind of default that quietly stays wrong for years once the port is forgotten.
It becomes worth caring about in exactly one scenario: a deployment on slow or network-backed storage, where repeated stat() on 46 templates per render is no longer free.
Fix is one keyword argument, gated on the same debug flag Flask used.
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 824
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 289
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LearningCircuit/local-deep-research
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
LearningCircuit/local-deep-research#6664 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in LearningCircuit/local-deep-research
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100