#35332: Bad performance in django.template.load.render_to_string
-------------------------------------+-------------------------------------
Reporter: Zeyad Moustafa | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Template system | Version: 5.0
Severity: Normal | Resolution: needsinfo
Keywords: performance | Triage Stage:
templates jinja | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Johnson):
Yeah, there’s no bug here. 30 times slowness is about right for a
Rust/Python comparison. Also the benchmark is minimal and unrealistic, the
margin should be less (maybe not much) for a typical template that has far
fewer nodes.
This would be an interesting forum discussion - not a bug in the bug
tracker. I’d be interested in seeing more. And if you want to get into
optimizing specific parts of the template engine, I’d be up for reviewing
some PRs. My recent work on the system checks may be a nice guide:
https://adamj.eu/tech/2024/03/23/django-optimizing-system-checks/
--
Ticket URL: <https://code.djangoproject.com/ticket/35332#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018ea0396449-42a9f547-09d5-418f-94ea-1d3c984e7fbe-000000%40eu-central-1.amazonses.com.