-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 32KB buffer for
copyFile()
(reduces copy time by 30%) (#1749)
* Use 32KB buffer for `copyFile()` (reduces copy time by 30%) This makes `:paste` comparable in performance to `cp --reflink=never` for large files. For large number of small files improvements are less substantial (compared to `cp -r --reflink=never`), though still noticeable. In both cases the copy takes about 30% less time than with `buf` size at 4096. 32KB is the same number `io.Copy()` uses internally (when it can), and is about where improvements stop. Context: #1685 (comment) * Apply suggested changes * Just delete incomplete an file on all errors * Mention new progress UI update frequency * Return the old (each 4MB copied) progress update frequency (progress UI updates don't seem to impact performance much)
- Loading branch information
1 parent
0c72034
commit 2d3cc97
Showing
2 changed files
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters