Message202240
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:46 | vstinner | set | recipients:
+ vstinner, neologix |
2013-11-05 20:34:46 | vstinner | set | messageid: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> |
2013-11-05 20:34:46 | vstinner | link | issue19506 messages |
2013-11-05 20:34:46 | vstinner | create | |
|