#35518: Avoid regex search for simple route patterns
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Jake
Type: | Howard
Cleanup/optimization | Status: closed
Component: Core (URLs) | Version: 5.0
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jake Howard):
You're exactly right. It's a 'relatively' simple change, although does add
a little complexity.
~300ns doesn't sound like much I agree, but this saving is per route per
request, as opposed to just once per request, so for large projects with
lots of URLs it can stack up. I can source some benchmarks of `resolve`
from a sensibly-sized project if that would help with review?
[https://github.com/django/django/pull/18270 PR] for your perusal.
--
Ticket URL: <https://code.djangoproject.com/ticket/35518#comment:4>
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/010701900df68f18-e7775050-171d-4504-a55e-c8f22ae0e4ef-000000%40eu-central-1.amazonses.com.