diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-08-15 15:03:43 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-17 20:13:24 -0700 |
commit | 41637a530efb761c713a36f1465cc5ea9b976900 (patch) | |
tree | 0ced85c845a70006bb57ce8a93c807e44666680d /src/node_http2.h | |
parent | 5dee17bb3c7d7b6fcec0d3ac02e0348c558a206b (diff) | |
download | android-node-v8-41637a530efb761c713a36f1465cc5ea9b976900.tar.gz android-node-v8-41637a530efb761c713a36f1465cc5ea9b976900.tar.bz2 android-node-v8-41637a530efb761c713a36f1465cc5ea9b976900.zip |
http2: remove callback-based padding
This option is not useful in practice, as mentioned in comments and the
documentation, because the overhead of calling into JS makes it
unreasonably expensive.
PR-URL: https://github.com/nodejs/node/pull/29144
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_http2.h')
-rw-r--r-- | src/node_http2.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/node_http2.h b/src/node_http2.h index 792078d126..db85dc6e5a 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -321,11 +321,9 @@ enum padding_strategy_type { PADDING_STRATEGY_ALIGNED, // Padding will ensure all data frames are maxFrameSize PADDING_STRATEGY_MAX, - // Padding will be determined via a JS callback. Note that this can be - // expensive because the callback is called once for every DATA and - // HEADERS frame. For performance reasons, this strategy should be - // avoided. - PADDING_STRATEGY_CALLBACK + // Removed and turned into an alias because it is unreasonably expensive for + // very little benefit. + PADDING_STRATEGY_CALLBACK = PADDING_STRATEGY_ALIGNED }; enum session_state_flags { @@ -877,8 +875,6 @@ class Http2Session : public AsyncWrap, public StreamListener { size_t maxPayloadLen); ssize_t OnMaxFrameSizePadding(size_t frameLength, size_t maxPayloadLen); - ssize_t OnCallbackPadding(size_t frameLength, - size_t maxPayloadLen); // Frame Handler int HandleDataFrame(const nghttp2_frame* frame); |