-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Write data into socket without rewriting obj #134
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This fix still won't help in improving performance as strings are immutable and they are "passed by value" and hence it will still lead to copy of string. Check below sample code to see performance impact of copying whole buffer.
|
@nav-agarwal GitHub is behaving inconsistently today. Could you please verify that you saw my |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
51ff0a7
to
807aebe
Compare
807aebe
to
541829d
Compare
@nav-agarwal memoryview/buffer should fix this now. |
I am not getting enought time to test it. But using memoryview might land us into trouble because of pyopenssl limitation. Read more here urllib3/urllib3#717 |
@nav-agarwal that's a curious find.. we could do |
Oh, and we could probably use smaller chunks as urllib3 does... |
yes... something like data[total_sent:total_sent + SSL_WRITE_BLOCKSIZE] |
@nav-agarwal #137 should do |
What kind of change does this PR introduce?
What is the related issue number (starting with
#
)Fix #133
slow down because of data var rewriting
N/A
Other information:
Checklist:
and description in grammatically correct, complete sentences
This change is