]> Sergey Matveev's repositories - public-inbox.git/commit
git: do our own read buffering for cat-file
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:04:21 +0000 (07:04 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commit6d2fad2c3f6eaf7334b1e805de607e1d5b24ff9e
treee2f7f72adb899fe1e85bcd3dd2cf086f245ccd18
parentba31b0f3e2314817536d4217e86b9ac280187b01
git: do our own read buffering for cat-file

To work with our event loop, we must perform read buffering
ourselves or risk starvation, as there doesn't appear to be
a way to check the amount of data buffered in userspace by
by the PerlIO layers without resorting to C or XS.

This lets us perform fewer syscalls at the expense of more Perl
ops.  As it stands, there seems to be a tiny performance
improvement, but more will be possible in the future.
lib/PublicInbox/Git.pm