You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/04/27 04:51:37 UTC
(pekko-http) branch optimize-http2-strict-data-collection created (now 169cedfa5)
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a change to branch optimize-http2-strict-data-collection
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
at 169cedfa5 Avoid unnecessary ByteString concat for strict HTTP2 entities
This branch includes the following new commits:
new 169cedfa5 Avoid unnecessary ByteString concat for strict HTTP2 entities
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-http) 01/01: Avoid unnecessary ByteString concat for strict HTTP2 entities
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch optimize-http2-strict-data-collection
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
commit 169cedfa5d452d472fa55f6825d8fa4ba47ccdff
Author: 虎鸣 <he...@alibaba-inc.com>
AuthorDate: Mon Apr 27 12:51:22 2026 +0800
Avoid unnecessary ByteString concat for strict HTTP2 entities
---
.../apache/pekko/http/impl/engine/http2/Http2StreamHandling.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2StreamHandling.scala b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2StreamHandling.scala
index e17ca4dc3..f59037de0 100644
--- a/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2StreamHandling.scala
+++ b/http-core/src/main/scala/org/apache/pekko/http/impl/engine/http2/Http2StreamHandling.scala
@@ -358,7 +358,10 @@ private[http2] trait Http2StreamHandling extends GraphStageLogic with LogHelper
extraInitialWindow: Int) extends ReceivingData {
override protected def onDataFrame(dataFrame: DataFrame): StreamState = {
- val newData = collectedData ++ dataFrame.payload
+ val newData =
+ if (collectedData.isEmpty) dataFrame.payload
+ else if (dataFrame.payload.isEmpty) collectedData
+ else collectedData ++ dataFrame.payload
if (dataFrame.endStream) {
totalBufferedData -= newData.length
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org