diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-08-05 20:12:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 20:12:15 -0400 |
commit | 046cccfe1768837fcd5b4c1fd7d52fb2d98c0b11 (patch) | |
tree | 387c54f8c52a42b5c4f363ffa352bf311c646df9 /core/shared_queue.js | |
parent | a517513182221aa351528cf15d28c449b49fea13 (diff) |
Remove dispatch optimization (#2732)
Deno.core.dispatch() used to push the "control" buf onto the shared
array buffer before calling into V8, with the idea that it was one less
argument to parse. Turns out there is no more overhead passing the
control ArrayBuffer directly over. Furthermore this optimization was
making the refactors outlined in #2730 more complex. Therefore it is
being removed.
Diffstat (limited to 'core/shared_queue.js')
-rw-r--r-- | core/shared_queue.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/shared_queue.js b/core/shared_queue.js index d7ab382d6..1b338b052 100644 --- a/core/shared_queue.js +++ b/core/shared_queue.js @@ -165,11 +165,7 @@ SharedQueue Binary Layout function dispatch(control, zeroCopy = null) { maybeInit(); - // First try to push control to shared. - const success = push(control); - // If successful, don't use first argument of core.send. - const arg0 = success ? null : control; - return Deno.core.send(arg0, zeroCopy); + return Deno.core.send(control, zeroCopy); } const denoCore = { |