This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients neologix, vstinner
Date 2013-11-05.20:34:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za>
In-reply-to
Content
The following code copies data, whereas the copy can be avoided using a memory view:

chunk = self._input[self._input_offset:self._input_offset + _PIPE_BUF]
self._input_offset += os.write(key.fd, chunk)

It should be replaced with:

input_view = memoryview(self._input)
...
chunk = input_view[self._input_offset:self._input_offset + _PIPE_BUF]
self._input_offset += os.write(key.fd, chunk)


This issue is a reminder for one of my comment of issue #18923.
History
Date User Action Args
2013-11-05 20:34:46vstinnersetrecipients: + vstinner, neologix
2013-11-05 20:34:46vstinnersetmessageid: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za>
2013-11-05 20:34:46vstinnerlinkissue19506 messages
2013-11-05 20:34:46vstinnercreate