-
- Downloads
libstdc++: Also use sendfile for big files
We were previously only using sendfile for files smaller than 2GB, as
sendfile needs to be called repeatedly for files bigger than that.
Some quick numbers, copying a 16GB file, average of 10 repetitions:
old:
real: 13.4s
user: 0.14s
sys : 7.43s
new:
real: 8.90s
user: 0.00s
sys : 3.68s
libstdc++-v3/ChangeLog:
* acinclude.m4 (_GLIBCXX_HAVE_LSEEK): Define.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/filesystem/ops-common.h (copy_file_sendfile): Define new
function for sendfile logic. Loop to support large files. Skip
zero-length files.
(do_copy_file): Use it.
Signed-off-by:
Jannik Glückert <jannik.glueckert@gmail.com>
Showing
- libstdc++-v3/acinclude.m4 32 additions, 19 deletionslibstdc++-v3/acinclude.m4
- libstdc++-v3/config.h.in 3 additions, 0 deletionslibstdc++-v3/config.h.in
- libstdc++-v3/configure 91 additions, 36 deletionslibstdc++-v3/configure
- libstdc++-v3/src/filesystem/ops-common.h 44 additions, 29 deletionslibstdc++-v3/src/filesystem/ops-common.h
Loading
Please register or sign in to comment