You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#16115 changed deno_core::Resource to have seperate read methods for BYOB optimized resources (files & sockets) and non-BYOB optimized resources (HTTP steams).
Currently the only way to read data from Rust -> JS is via the op_read op. This op is BYOB, and can incur an extra data copy & allocation for non-BYOB ops. I propose we rename op_read to op_read_byob and add a new op_read_buf that is not BYOB. We can then add a second readableStreamForRid function for non-BYOB optimized resources. These ReadableStream's can use op_read_buf internally to avoid a bunch of small data copies, maybe even some data copies.
The text was updated successfully, but these errors were encountered:
#16115 changed
deno_core::Resource
to have seperate read methods for BYOB optimized resources (files & sockets) and non-BYOB optimized resources (HTTP steams).Currently the only way to read data from Rust -> JS is via the
op_read
op. This op is BYOB, and can incur an extra data copy & allocation for non-BYOB ops. I propose we renameop_read
toop_read_byob
and add a newop_read_buf
that is not BYOB. We can then add a secondreadableStreamForRid
function for non-BYOB optimized resources. TheseReadableStream
's can useop_read_buf
internally to avoid a bunch of small data copies, maybe even some data copies.The text was updated successfully, but these errors were encountered: