node/benchmark/fs
Ruben Bridgewater d3dd49fe2b
fs: improve promise based readFile performance for big files
This significantly reduces the peak memory for the promise
based readFile operation by reusing a single memory chunk after
each read and strinigifying that chunk immediately.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/44295
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-10-06 17:03:56 +00:00
..
bench-mkdirp.js benchmark: fix bench-mkdirp to use recursive option 2018-10-28 15:09:41 +01:00
bench-opendir.js fs: add `bufferSize` option to `fs.opendir()` 2019-10-28 14:34:25 +01:00
bench-readdir.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
bench-readdirSync.js benchmark: use let and const instead of var 2020-01-28 19:59:41 -08:00
bench-realpath.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
bench-realpathSync.js benchmark: use let and const instead of var 2020-01-28 19:59:41 -08:00
bench-stat-promise.js fs: drop duplicate API in promises mode 2018-05-19 11:04:28 +03:00
bench-stat.js benchmark: use let and const instead of var 2020-01-28 19:59:41 -08:00
bench-statSync-failure.js benchmark: enable no-empty ESLint rule 2022-02-05 12:58:27 +00:00
bench-statSync.js benchmark : changed `fstat` to `fstatSync` 2020-11-26 07:28:59 +00:00
read-stream-throughput.js benchmark: enable no-empty ESLint rule 2022-02-05 12:58:27 +00:00
readFileSync.js benchmark: use let and const instead of var 2020-01-28 19:59:41 -08:00
readfile-partitioned.js fs: add encoding parameter to benchmarks 2022-08-21 14:28:04 +00:00
readfile-promises.js fs: improve promise based readFile performance for big files 2022-10-06 17:03:56 +00:00
readfile.js fs: add encoding parameter to benchmarks 2022-08-21 14:28:04 +00:00
write-stream-throughput.js benchmark: enable no-empty ESLint rule 2022-02-05 12:58:27 +00:00
writefile-promises.js benchmark: enable no-empty ESLint rule 2022-02-05 12:58:27 +00:00