9eff511c5e
To avoid buffer copy in nghttp2_data_source_read_callback, this commit introduces NGHTTP2_DATA_FLAG_NO_COPY and nghttp2_send_data_callback. By using NGHTTP2_DATA_FLAG_NO_COPY in nghttp2_data_source_read_callback, application can avoid to copy application data to given buffer. Instead, application has to implement nghttp2_send_data_callback to send complete DATA frame by itself. We see noticeable performance increase in nghttpd and tiny-nghttpd using this new feature. On the other hand, nghttpx does not show such difference, probably because buffer copy is not bottleneck. Using nghttp2_send_data_callback adds complexity, so it is recommended to measure the performance to see whether this extra complexity worth it. |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile.am | ||
asio-cl.cc | ||
asio-cl2.cc | ||
asio-sv.cc | ||
asio-sv2.cc | ||
client.c | ||
deflate.c | ||
libevent-client.c | ||
libevent-server.c | ||
tiny-nghttpd.c |