mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
perf(ext/websocket): use internal dispatch for msg events (#18904)
``` Linux divy-2 5.19.0-1022-gcp #24~22.04.1-Ubuntu SMP Sun Apr 23 09:51:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 32GiB System memory Intel(R) Xeon(R) CPU @ 3.10GHz # main Msg/sec: 89398.250000 Msg/sec: 90079.750000 # this patch Msg/sec: 91919.750000 Msg/sec: 91762.250000 ```
This commit is contained in:
parent
74bb09aa38
commit
314799bc4f
2 changed files with 4 additions and 2 deletions
|
@ -1527,6 +1527,7 @@ export {
|
|||
CloseEvent,
|
||||
CustomEvent,
|
||||
defineEventHandler,
|
||||
dispatch,
|
||||
ErrorEvent,
|
||||
Event,
|
||||
EventTarget,
|
||||
|
|
|
@ -15,6 +15,7 @@ import {
|
|||
_skipInternalInit,
|
||||
CloseEvent,
|
||||
defineEventHandler,
|
||||
dispatch,
|
||||
ErrorEvent,
|
||||
Event,
|
||||
EventTarget,
|
||||
|
@ -451,7 +452,7 @@ class WebSocket extends EventTarget {
|
|||
data: value,
|
||||
origin: this[_url],
|
||||
});
|
||||
this.dispatchEvent(event);
|
||||
dispatch(this, event);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
|
@ -470,7 +471,7 @@ class WebSocket extends EventTarget {
|
|||
origin: this[_url],
|
||||
[_skipInternalInit]: true,
|
||||
});
|
||||
this.dispatchEvent(event);
|
||||
dispatch(this, event);
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
|
|
Loading…
Reference in a new issue