-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for two micro-optimzations in RequestHandler.start function #2604
Comments
|
Regarding the calls to the
Compared to the cost of the
Getting rid of this will give an increase of the performance of roughly 5%. The only place where the TCP is tunned is in that is really used is in by the [1] https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_fileresponse.py#L133 |
We can drop |
Hidding in somehow the access to the TCP tunning methods giving to the API consistency .... or it is too much and overcomplicates and we believe that we won't fail? |
Explicit support for NODELAY and CORK is really overcomplication. |
|
if we can, we should remove cork and nodally api. it is broken right now for pipelined requests on server |
Forget about
|
Fixed by #2612 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Basically, I would like to work on two different micro-optimizations to speed up a bit, arround 5% and 10% overall, for the most costly function
RequestHandler.start
. I would like to gather your feedback before start working on them.Handle most of the keepalive logic outside of the
RequestHandler.start
, and leave there only the none happy path - when the keep alive has to be canceled. This will save us to execute a few opcodes and many time syscalls. [1]Get rid of the
set_tcp_cork
andset_tcp_nodelay
operations and provide an API to be used by the internal layer that guarantees that a code path that touches any TCP configuration sets back the original values, this might be implemented using a context. [2]I know that I might be missing something that would avoid implementing this two micro-optimizations, hence please feedback will be more than appreciate
[1] https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_protocol.py#L476
[2] https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_protocol.py#L426
The text was updated successfully, but these errors were encountered: