Commit c9a869d
committed
(MODULES-8748) Improve pipe reading in the PowerShell Manager
Previously the powershell manager was modified to read in data from the pipe
until all data was read, in 8K chunks. However it was noted that this would be
causing more IO calls than needed due to the 8K chunks.
In this commit, the reader will attempt to read all bytes in a single call and
use the string concatenation method to reduce the number the potential number
of internal objects being created.
Also the is_readable? method was updated to also check that the stream is not
EOF. In odd cases the stream can show that it's ready to read, but a sysread
call will throw an EOF, for example this could occur when data is buffered in
a slow way.1 parent a250d39 commit c9a869d
1 file changed
+10
-11
lines changedLines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
408 | 406 | | |
| 407 | + | |
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
| |||
0 commit comments