You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2024/03/29 12:29:00 UTC

[jira] [Resolved] (KAFKA-16397) Use ByteBufferOutputStream to avoid array copy

     [ https://issues.apache.org/jira/browse/KAFKA-16397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chia-Ping Tsai resolved KAFKA-16397.
------------------------------------
    Fix Version/s: 3.8.0
       Resolution: Fixed

> Use ByteBufferOutputStream to avoid array copy
> ----------------------------------------------
>
>                 Key: KAFKA-16397
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16397
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia Chuan Yu
>            Priority: Minor
>             Fix For: 3.8.0
>
>
> from https://github.com/apache/kafka/pull/15148#discussion_r1531889679
> source code:
> https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/telemetry/internals/ClientTelemetryUtils.java#L216
> we can use ByteBufferOutputStream to collect the uncompressed data, and then return the inner buffer directly instead of copying full array.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)