Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: read full size if known in promises.readFile
If we have an estimate of the file size available from the previous stat call, use that for the size of the first chunk to be read. This increases performance by reading more data (and, most likely, all data) at once without incurring memory overhead in most situations. PR-URL: #37127 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information