> Each regular expression in a `urlpatterns` is compiled the first time
it’s accessed. This makes the system blazingly fast.
https://docs.djangoproject.com/en/dev/topics/http/urls/#performance
While the first part of the sentence is true, it does not serve as a
reason why the dispatcher is blazingly fast. And the general public
perception these days is almost the opposite: Django’s URL dispatcher is
thought to be between “not fast” and “slow”, depending on what standard
you compare it against.
While I am happy with Django’s URL dispatcher, and certainly don’t have
anything to complain, it might be a good idea to remove the ten-year-old
statement that is not valid anymore.
--
Ticket URL: <https://code.djangoproject.com/ticket/25996>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: pramodpsb@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:1>
* cc: knbk (added)
* easy: 1 => 0
* stage: Unreviewed => Accepted
Comment:
I'd suggest to revise the section to describe what parts of the URL system
are fast (routing URLs, I think) and what parts are slow (reversing URLs,
I think). There are probably other considerations. Marten might be in a
good position to do this since he's been working on some
[https://github.com/django/django/pull/5578 URL dispatcher changes].
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:2>
* owner: nobody => j-shu
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:3>
* has_patch: 0 => 1
Comment:
PR on: https://github.com/django/django/pull/6879
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:4>
* needs_better_patch: 0 => 1
Comment:
Comments for improvement are on the PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:5>
* owner: j-shu => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:6>
* owner: (none) => Ralph Reid
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:7>
Comment (by Carlton Gibson):
[https://github.com/django/django/pull/16159 New quite minimal patch
submitted here]
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:8>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:9>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d3579ca1124a163cad760558e8d138984e7a10b4" d3579ca1]:
{{{
#!CommitTicketReference repository=""
revision="d3579ca1124a163cad760558e8d138984e7a10b4"
Fixed #25996 -- Revised performance section in URLs topic docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:11>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"950a84ce42e087a665449a1323e868d6660efbeb" 950a84ce]:
{{{
#!CommitTicketReference repository=""
revision="950a84ce42e087a665449a1323e868d6660efbeb"
[4.1.x] Fixed #25996 -- Revised performance section in URLs topic docs.
Backport of d3579ca1124a163cad760558e8d138984e7a10b4 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25996#comment:12>