Skip to content

Commit 1c06409

Browse files
committed
fs: improve fsPromises writeFile performance
Increase the write chunk size in fsPromises writeFile to improve performance.
1 parent 49342fe commit 1c06409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/fs/promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const kIoMaxLength = 2 ** 31 - 1;
77
// Note: This is different from kReadFileBufferLength used for non-promisified
88
// fs.readFile.
99
const kReadFileMaxChunkSize = 2 ** 14;
10-
const kWriteFileMaxChunkSize = 2 ** 14;
10+
const kWriteFileMaxChunkSize = 512 ** 1024;
1111

1212
const {
1313
ArrayPrototypePush,

0 commit comments

Comments
 (0)