Opened 5 years ago
Last modified 5 years ago
#25996 assigned Cleanup/optimization
Revise the Performance section in topics/http/urls
Reported by: | Tzu-ping Chung | Owned by: | j-shu |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | pramodpsb@…, Marten Kenbeek | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The section, written back in the 0.9 days during 2005, goes:
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.
Change History (5)
comment:1 Changed 5 years ago by
Cc: | pramodpsb@… added |
---|
comment:2 Changed 5 years ago by
Cc: | Marten Kenbeek added |
---|---|
Easy pickings: | unset |
Summary: | Remove the Performance section in topics/http/urls → Revise the Performance section in topics/http/urls |
Triage Stage: | Unreviewed → Accepted |
comment:3 Changed 5 years ago by
Owner: | changed from nobody to j-shu |
---|---|
Status: | new → assigned |
comment:5 Changed 5 years ago by
Patch needs improvement: | set |
---|
Comments for improvement are on the PR.
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 URL dispatcher changes.