1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 08:33:43 -05:00

perf(ext/websocket): make op_server_ws_next_event deferred (#18632)

Avoid attempting to read immediately, wasting time polling the future.
2% throughput improvement on Linux.
This commit is contained in:
Divy Srivastava 2023-04-13 04:21:47 +05:30 committed by GitHub
parent d97f9d22b3
commit 659d1dd7f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ pub async fn op_server_ws_close(
Ok(()) Ok(())
} }
#[op] #[op(deferred)]
pub async fn op_server_ws_next_event( pub async fn op_server_ws_next_event(
state: Rc<RefCell<OpState>>, state: Rc<RefCell<OpState>>,
rid: ResourceId, rid: ResourceId,