apenwarr: I modified Carsten's patch slightly, since "line mode" is not
really appropriate. On my system, this patch (or Carsten's) can read 111
megabytes in 1.7 seconds instead of 2.1 seconds, or 65MB/sec instead of 52
MB/sec.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
close_fds = True,
+ bufsize = 4096,
preexec_fn = _gitenv)
def _fast_get(self, id):
assert(not id.startswith('-'))
self.inprogress = id
self.p.stdin.write('%s\n' % id)
+ self.p.stdin.flush()
hdr = self.p.stdout.readline()
if hdr.endswith(' missing\n'):
self.inprogress = None