1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 22:09:02 -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 Levente Kurusa
parent a1845a041b
commit 0b023538a0
No known key found for this signature in database
GPG key ID: 9F72F3C05BA137C4

View file

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