Commit e216d8f4 authored by Nitzan Uziely's avatar Nitzan Uziely Committed by Benjamin Gruenbaum
Browse files

fs: improve fsPromises readFile performance

Improve the fsPromises readFile performance
by allocating only one buffer, when size is known,
increase the size of the readbuffer chunks,
and dont read more data if size bytes have been read

Refs: https://github.com/nodejs/node/issues/37583
PR-URL: https://github.com/nodejs/node/pull/37608


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent e2f5bb75
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment