-
-
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
_release_connection
is always called 4x on a successful request
#10089
Comments
I'm curious how did you get such pretty graph? What tool do you use? |
The idea is: connection is released either on reaching EOF for response body or explicit |
I think if the writer is done (presumably the situation in most cases), then all but one of those calls are basically no-op, so shouldn't have much impact on performance (I guess this can be seen by the start path being the only one which exceeds 1%). The I think that's 3 calls, rather than 4, unless I'm missing something. |
Its a bit confusing, but notice I've been looking at it because I can't figure out why on codspeed we see the cost of releasing the connection as more expensive than acquiring the connection. Usually something like that is the other way around. |
I generated it using cProfile, than I converted the |
Ah, yes, the wait_for_close() method calls .release() a second time. In theory, you can probably remove that second call to .release(), but there might have been another race condition there. If the tests pass without that call, then it's probably fine. |
I was trying to find why
_release_connection
is always called 4x per requestOriginally posted by @bdraco in #10088 (comment)
The text was updated successfully, but these errors were encountered: