Author vstinner
Recipients neologix, vstinner
Date 2013-11-05.20:34:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2013-11-05 20:34:46vstinnersetrecipients: + vstinner, neologix
2013-11-05 20:34:46vstinnersetmessageid: <>
2013-11-05 20:34:46vstinnerlinkissue19506 messages
2013-11-05 20:34:46vstinnercreate