Skip to content

Commit

Permalink
fs: improve fsPromises writeFile performance
Browse files Browse the repository at this point in the history
Increase the write chunk size in fsPromises writeFile
to improve performance.
  • Loading branch information
Linkgoron committed Mar 5, 2021
1 parent 49342fe commit 1c06409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Expand Up @@ -7,7 +7,7 @@ const kIoMaxLength = 2 ** 31 - 1;
// Note: This is different from kReadFileBufferLength used for non-promisified
// fs.readFile.
const kReadFileMaxChunkSize = 2 ** 14;
const kWriteFileMaxChunkSize = 2 ** 14;
const kWriteFileMaxChunkSize = 512 ** 1024;

const {
ArrayPrototypePush,
Expand Down

0 comments on commit 1c06409

Please sign in to comment.