#37163: Optimize `@user_passes_test`
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: Adam Johnson
Johnson |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: dev
contrib.auth |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
#35030 added async support to this decorator, but put the async test and
wrapping for `test_func` at call time. This work can instead be done once
at decoration time, saving ~500 ns per request.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37163>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.