Increase the buffer size used in tr_moveFile (#933)

In some filesystems, including ones mounted on a network drive, using a small buffer size 
significantly hurts copy performance. Upping the buffer to 1024kb to increase copy performance.
This commit is contained in:
Tom Forbes 2019-11-06 15:46:13 +00:00 committed by Charles Kerr
parent 2ef07517b6
commit 8d7fbb5d45
1 changed files with 1 additions and 1 deletions

View File

@ -1686,7 +1686,7 @@ bool tr_moveFile(char const* oldpath, char const* newpath, tr_error** error)
char* buf = NULL;
tr_sys_path_info info;
uint64_t bytesLeft;
size_t const buflen = 1024 * 128; /* 128 KiB buffer */
size_t const buflen = 1024 * 1024; /* 1024 KiB buffer */
/* make sure the old file exists */
if (!tr_sys_path_get_info(oldpath, 0, &info, error))