Routing checks handlers in each request #2540
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The logic in
routing.py
checks whether the handler is async in each request.starlette/starlette/routing.py
Line 71 in 554f368
This does not seem to be required and if we do the check only once at the beginning of
request_response
, we achieve some performance gains as seen in https://github.com/encode/starlette/pull/2536/filesBeta Was this translation helpful? Give feedback.
All reactions