paramiko/paramiko — pull request #454 by jwm (2014-12-12 18:30:43+00:00)
Title: Increase ProxyCommand performance, reduce CPU utilization

This should fix https://github.com/paramiko/paramiko/issues/420:

- Passing the remaining time as the timeout argument to select() keeps it from blocking beyond the allowed time
- Reading >1 bytes at a time lowers CPU consumption. AFAIK, read()'s length argument is the maximum number of bytes to return, and as long as there is at least one byte of data available, read() will return immediately, without blocking. Thus, since select() just ensured that data is available on that file descriptor, this shouldn't blow past the timeout.

I also moved to time.time() for the other performance reasons cited in #420; I'm not sure if this has a meaningful impact on Windows, since I think time.time() has millisecond resolution there, not microsecond.