digests, copy-file: increase the IO buffer size from 4KiB to 32KiB
authorPádraig Brady <P@draigBrady.com>
Thu, 22 Oct 2009 16:36:28 +0000 (17:36 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 23 Oct 2009 20:00:24 +0000 (22:00 +0200)
commitc910e6ce03eefaf1b92911b3de50b2605d810d34
tree18b3a0aea644a1662404536963883d5c5dbe3cba
parent82381b9e5b37125305709d412d8322b35e5c4796
digests, copy-file: increase the IO buffer size from 4KiB to 32KiB

This results in a significant decrease in syscall overhead
giving a 3% speedup to the digest utilities for example
(when processing large files from cache).
Storage is moved from the stack to the heap as some
threaded environments for example can have small stacks.

* lib/copy-file.c (copy_file_preserving): Use a 32KiB malloced buffer
* modules/copy-file: Depend on xalloc
* lib/md2.c: Likewise
* lib/md4.c: Likewise
* lib/md5.c: Likewise
* lib/sha1.c: Likewise
* lib/sha256.c: Likewise
* lib/sha512.c: Likewise
ChangeLog
lib/copy-file.c
lib/md2.c
lib/md4.c
lib/md5.c
lib/sha1.c
lib/sha256.c
lib/sha512.c
modules/copy-file