#33700: APPEND_SLASH adds significant latency to all requests not ending in /
(even
if successful)
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Anders
Type: | Kaseorg
Cleanup/optimization | Status: closed
Component: HTTP handling | Version: 4.0
Severity: Normal | Resolution: fixed
Keywords: CommonMiddleware | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"fbac2a4dd846b52c4f379eacb5bab654fe9540cc" fbac2a4d]:
{{{
#!CommitTicketReference repository=""
revision="fbac2a4dd846b52c4f379eacb5bab654fe9540cc"
Fixed #33700 -- Skipped extra resolution for successful requests not
ending with /.
By moving a should_redirect_with_slash call out of an if block, commit
9390da7fb6e251eaa9a785692f987296cb14523f negated the performance fix
of commit 434d309ef6dbecbfd2b322d3a1da78aa5cb05fa8 (#24720).
Meanwhile, the logging issue #26293 that it targeted was subsequently
fixed more fully by commit 40b69607c751c4afa453edfd41d2ed155e58187e
(#26504), so it is no longer needed. This effectively reverts it.
This speeds up successful requests not ending with / when APPEND_SLASH
is enabled (the default, and still useful in projects with a mix of
URLs with and without trailing /). The amount of speedup varies from
about 5% in a typical project to nearly 50% on a benchmark with many
routes.
Signed-off-by: Anders Kaseorg <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33700#comment:9>
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/01070181248e59a7-7a9de199-ac28-4a77-90fd-afc0179a5b6d-000000%40eu-central-1.amazonses.com.