js-compute-runtime icon indicating copy to clipboard operation
js-compute-runtime copied to clipboard

KVStoreEntry for retrieving the body doesn't appear to be an async operation

Open vcarvajal-sigsci opened this issue 10 months ago • 1 comments

Calling arrayBuffer(), json(), or text() on KVStoreEntry eventually reaches the function read_from_handle_all inside of runtime/fastly/builtins/fetch/request-response.cpp. This function will read the entire body of the object into memory before returning, and there is no suspension point while it waits for chunks of the body (in other words it doesn’t return control to the event loop until after all the chunks have been read).

vcarvajal-sigsci avatar Apr 09 '25 17:04 vcarvajal-sigsci

https://github.com/fastly/js-compute-runtime/issues/1179

kablesanhk avatar Jun 11 '25 21:06 kablesanhk