summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-02 16:38:06 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-02 16:39:26 +0100
commit73b2cb9ed81124e294337738a323c2f28b0b64ec (patch)
treeb7c15e451e113b9cce951a80f6956179edd8b37c /Userland
parent94a6b248ca502456f46d31ccf3a4ad7fdf38a2ad (diff)
downloadserenity-73b2cb9ed81124e294337738a323c2f28b0b64ec.zip
cp: Read/write 32 KB at a time to go faster :^)
This is a huge speed-up (3x) when copying large files. Ideally this would be optimized by the kernel somehow, but we're not there yet.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/cp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/cp.cpp b/Userland/cp.cpp
index d2e12e0153..93e1db6cd3 100644
--- a/Userland/cp.cpp
+++ b/Userland/cp.cpp
@@ -95,7 +95,7 @@ bool copy_file(String src_path, String dst_path, struct stat src_stat, int src_f
}
for (;;) {
- char buffer[BUFSIZ];
+ char buffer[32768];
ssize_t nread = read(src_fd, buffer, sizeof(buffer));
if (nread < 0) {
perror("read src");