diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-04-27 12:47:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 12:47:52 +0200 |
commit | d043a6d72cbf683c70f7eb4b9b3c09003afd2683 (patch) | |
tree | 715dca55fe485ff164ca14b6ffe24ba90325ebce /ext/websocket/lib.rs | |
parent | 1e331a4873cacadc9633e7daeaabdb2749950fee (diff) |
perf(ext/websocket): various performance improvements (#18862)
- No need to wrap buffer in a `new DataView()`
- Deferred ops are still eagerly polled, but resolved on the next
tick of the event loop, we don't want them to be eagerly polled
- Using "core.opAsync"/"core.opAsync2" incurs additional cost
of looking up these functions on each call. Similarly with "ops.*"
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r-- | ext/websocket/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index df4127d27..9ea341fbb 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -427,7 +427,7 @@ pub async fn op_ws_close( Ok(()) } -#[op(deferred)] +#[op(fast)] pub async fn op_ws_next_event( state: Rc<RefCell<OpState>>, rid: ResourceId, |