[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2021-04-19 Thread Josh Snyder
Change by Josh Snyder : -- keywords: +patch pull_requests: +24203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25478 ___ Python tracker <https://bugs.python.org/issu

[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2019-06-20 Thread Josh Snyder
New submission from Josh Snyder : Background: SSLSocket.read drops the GIL and performs exactly one successful call to OpenSSL's `SSL_read`, whose documentation states "At most the contents of one record will be returned". TLS records are at most 16KB, so high throughp

[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-22 Thread Josh Snyder
Change by Josh Snyder : -- keywords: +patch pull_requests: +9381 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35046> ___ ___ Py

[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-22 Thread Josh Snyder
New submission from Josh Snyder : logging.StreamHandler contains the following code: stream.write(msg) stream.write(self.terminator) stream.flush() When sys.stderr (or whatever other stream) is unbuffered, this results in two system calls and allows log records from different

[issue32475] Add ability to query number of buffered bytes available on buffered I/O

2018-06-26 Thread Josh Snyder
Josh Snyder added the comment: I've opened PR #7947 with another approach to this issue. In my use-case, an HTTP client makes a request and uses buffered I/O to parse the response headers. I would like to hand off the response socket to an extension module for use with raw I/O syscalls

[issue32475] Add ability to query number of buffered bytes available on buffered I/O

2018-06-26 Thread Josh Snyder
Change by Josh Snyder : -- pull_requests: +7556 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32475> ___ ___ Python-bugs-list mai