-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: support Uint8Array input to methods #10382
Conversation
Allow `fs.read`, `fs.write` and `fs.writeFile` to take `Uint8Array` arguments.
Does |
Yes and yes; |
Sorry, I'm not able to review this right now, but I wanted to express a heavy +1 for this change. |
Landed in f2ef850 |
Allow `fs.read`, `fs.write` and `fs.writeFile` to take `Uint8Array` arguments. PR-URL: #10382 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
@addaleax this lands cleanly on v7.x but the cherry-pick isn't bring over the changes to src/node_util.cc for some reason? I keep getting this error when trying to run tests:
Mind submitting a backport PR for it? |
Ah scratch that, looks like it depends on #10236 which is semver-major. |
Allow `fs.read`, `fs.write` and `fs.writeFile` to take `Uint8Array` arguments. PR-URL: nodejs#10382 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
Done: #10593 |
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) #10443 - Improve performance of Buffer.from() by ~50% (Brian White) #10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) #10445 * fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) #10382 * http: Improve performance of http server by ~7% (Brian White) #6533 * npm: Upgrade to v4.0.5 (Kat Marchán) #10330 PR-URL: #10589
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) #10443 - Improve performance of Buffer.from() by ~50% (Brian White) #10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) #10445 * fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) #10382 * http: Improve performance of http server by ~7% (Brian White) #6533 * npm: Upgrade to v4.0.5 (Kat Marchán) #10330 PR-URL: #10589
Notable changes: * buffer: - Improve performance of Buffer allocation by ~11% (Brian White) nodejs/node#10443 - Improve performance of Buffer.from() by ~50% (Brian White) nodejs/node#10443 * events: Improve performance of EventEmitter.once() by ~27% (Brian White) nodejs/node#10445 * fs: Allow passing Uint8Array to fs methods where Buffers are supported. (Anna Henningsen) nodejs/node#10382 * http: Improve performance of http server by ~7% (Brian White) nodejs/node#6533 * npm: Upgrade to v4.0.5 (Kat Marchán) nodejs/node#10330 PR-URL: nodejs/node#10589 Signed-off-by: Ilkka Myller <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
fs
Description of change
Allow
fs.read
,fs.write
andfs.writeFile
to takeUint8Array
arguments./cc @nodejs/fs
CI: https://ci.nodejs.org/job/node-test-commit/6765/