Increase I/O buffer size.
Uses a buffer size that is more reasonable for modern transfer speeds, while still providing enough granularity for cancellation. This heavily reduces the computational overhead on SSD drives.
This commit is contained in:
parent
55cd860ea3
commit
7c2fd87308
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ log("trigger event");
|
|||
if (bytes.length == 0) safeAtomicStore(f.ioStatus, IOStatus.ok);
|
||||
|
||||
while (bytes.length > 0) {
|
||||
auto sz = min(bytes.length, 4096);
|
||||
auto sz = min(bytes.length, 512*1024);
|
||||
auto ret = () @trusted { return mixin("."~op)(cast(int)file, bytes.ptr, cast(uint)sz); } ();
|
||||
if (ret != sz) {
|
||||
safeAtomicStore(f.ioStatus, IOStatus.error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue