]> git.ipfire.org Git - thirdparty/coreutils.git/commit
split: avoid unnecessary input buffering
authorPádraig Brady <P@draigBrady.com>
Thu, 20 Mar 2014 10:00:13 +0000 (10:00 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 24 Mar 2014 09:10:20 +0000 (09:10 +0000)
commit5f9a5b3f0346f4fb6b758953d4eaeff3d6a419d6
tree1031618daa861c6df9dba9c0af076ef05b8427d9
parentb010481e1fb24a22c22b6a279e8d24ed3ab4362a
split: avoid unnecessary input buffering

Input buffering is best avoided because it introduces
delayed processing of output for intermittent input,
especially when the output size is less than that of
the input buffer.  This is significant when output
is being further processed which could happen if split
is writing to precreated fifos, or through --filter.

If input is arriving quickly from a pipe then this will
already be buffered before we read it, so fast arriving
input shouldn't be a performance issue.

* src/split.c (lines_split, lines_bytes_split, bytes_split,
lines_chunk_split, bytes_chunk_extract): s/full_read/safe_read/.
* THANKS.in: Mention the reporter.
* NEWS: Mention the improvement.
NEWS
THANKS.in
src/split.c