diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-12-23 16:42:12 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-12-23 16:42:12 +0100 |
commit | f63123c385738b059cd854b694a0f62558fb8cbe (patch) | |
tree | 735022972359476a575b8d2e40937da6504b62ba /apt-inst | |
parent | 7a68effcb904b4424b54a30e448b6f2560cd1078 (diff) |
implement a buffer system for FileFd::ReadLine
The default implementation of ReadLine was very naive by just reading
each character one-by-one. That is kinda okay for libraries implementing
compression as they have internal buffers (but still not great), but
while working with files directly or via a pipe as there is no buffer
there so all those reads are in fact system calls.
This commit introduces an internal buffer in the FileFd implementation
which is only used by ReadLine. The more low-level Read and all other
actions remain unbuffered – they just changed to deal with potential
"left-overs" in the buffer correctly.
Closes: 808579
Diffstat (limited to 'apt-inst')
0 files changed, 0 insertions, 0 deletions