diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-10-03 00:26:51 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-06 03:48:10 +0300 |
commit | afdc3d0d187e4e3a336937df17a4c90092405e2a (patch) | |
tree | f16e7b4920a24d3ed7e711380450bd8b302ee40b /src/node_options.h | |
parent | 28c3a9dd723e124a0e38588826c737eee7bfded5 (diff) |
dgram: use `uv_udp_try_send()`
This improves dgram performance by avoiding unnecessary async
operations.
One issue with this commit is that it seems hard to actually create
conditions under which the fallback path to the async case is
actually taken, for all supported OS, so an internal CLI option
is used for testing that path.
Another caveat is that the lack of an async operation means
that there are slight timing differences (essentially `nextTick()`
rather than `setImmediate()` for the send callback).
PR-URL: https://github.com/nodejs/node/pull/29832
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_options.h')
-rw-r--r-- | src/node_options.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_options.h b/src/node_options.h index ea0efbc9e8a..dda9b2b875e 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -135,6 +135,7 @@ class EnvironmentOptions : public Options { bool heap_prof = false; #endif // HAVE_INSPECTOR std::string redirect_warnings; + bool test_udp_no_try_send = false; bool throw_deprecation = false; bool trace_deprecation = false; bool trace_sync_io = false; |