mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
refactor(ext/http): Use HttpRecord as response body to track until body completion (#20822)
Use HttpRecord as response body so requests can be tracked all the way to response body completion. This allows Request properties to be accessed while the response body is streaming. Graceful shutdown now awaits a future instead of async spinning waiting for requests to finish. On the minimal benchmark this refactor improves performance an additional 2% over pooling alone for a net 3% increase over the previous deno main branch. Builds upon https://github.com/denoland/deno/pull/20809 and https://github.com/denoland/deno/pull/20770. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
This commit is contained in:
parent
0209f7b469
commit
e5819777c3
5 changed files with 341 additions and 336 deletions
|
@ -108,6 +108,7 @@ deno_core::extension!(
|
|||
op_http_write_headers,
|
||||
op_http_write_resource,
|
||||
op_http_write,
|
||||
http_next::op_http_close_after_finish,
|
||||
http_next::op_http_get_request_header,
|
||||
http_next::op_http_get_request_headers,
|
||||
http_next::op_http_get_request_method_and_url<HTTP>,
|
||||
|
@ -121,7 +122,6 @@ deno_core::extension!(
|
|||
http_next::op_http_set_response_header,
|
||||
http_next::op_http_set_response_headers,
|
||||
http_next::op_http_set_response_trailers,
|
||||
http_next::op_http_track,
|
||||
http_next::op_http_upgrade_websocket_next,
|
||||
http_next::op_http_upgrade_raw,
|
||||
http_next::op_raw_write_vectored,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue