Open meshy opened 10 months ago
By only sleeping when the input stream is waiting, this change ensures that we don't delay when there is still data available to read.
This provides a significant speed improvement to scripts which are passing a populated stream of data, rather than awaiting user input from stdin.
I had to modify an existing test to ensure that it continued to see sleeps.
sleep
I have also changed the default chunk read size to match Python's default, which is the "“Preferred” blocksize for efficient file system I/O." (Of course, I'm happy to revert this if it makes the PR more palatable.)
Fixes https://github.com/pyinvoke/invoke/issues/774
By only sleeping when the input stream is waiting, this change ensures that we don't delay when there is still data available to read.
This provides a significant speed improvement to scripts which are passing a populated stream of data, rather than awaiting user input from stdin.
I had to modify an existing test to ensure that it continued to see
sleep
s.I have also changed the default chunk read size to match Python's default, which is the "“Preferred” blocksize for efficient file system I/O." (Of course, I'm happy to revert this if it makes the PR more palatable.)
Fixes https://github.com/pyinvoke/invoke/issues/774