maskit commented on code in PR #13554:
URL: https://github.com/apache/trafficserver/pull/13554#discussion_r3790365077
##########
src/iocore/net/quic/QUICStream.cc:
##########
@@ -144,24 +155,28 @@ QUICStream::receive_data(QUICStreamIO &stream_io)
}
int64_t
-QUICStream::send_data(QUICStreamIO &stream_io)
+QUICStream::send_data(QUICStreamIO &stream_io, size_t max_bytes_this_event)
{
bool fin = false;
ssize_t len = 0;
[[maybe_unused]] ErrorCode error_code{0};
size_t written_this_event = 0;
+ // _write_vio.nbytes is set once when the VIO is armed and doesn't change
over the
+ // course of this call, so query it once instead of re-locking the adapter's
mutex
+ // for the same value on every loop iteration below.
+ const uint64_t total_len = this->_adapter->total_len();
- while (written_this_event < MAX_STREAM_SEND_BYTES_PER_EVENT) {
+ while (written_this_event < max_bytes_this_event) {
Review Comment:
This is the biggest improvement. Fixed size cap -> Variable size cap based
on the number of streams.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]