[ 
https://issues.apache.org/jira/browse/KAFKA-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784463#comment-13784463
 ] 

Guozhang Wang commented on KAFKA-527:
-------------------------------------

If we do not want to use the attribute byte and have the limit, then we can 
just still do decompression to get the size of messages in a wrapper Message. 
This is the same as my previous proposal which still saves us re-compression.

> Compression support does numerous byte copies
> ---------------------------------------------
>
>                 Key: KAFKA-527
>                 URL: https://issues.apache.org/jira/browse/KAFKA-527
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jay Kreps
>         Attachments: java.hprof.no-compression.txt, java.hprof.snappy.text, 
> KAFKA-527.message-copy.history
>
>
> The data path for compressing or decompressing messages is extremely 
> inefficient. We do something like 7 (?) complete copies of the data, often 
> for simple things like adding a 4 byte size to the front. I am not sure how 
> this went by unnoticed.
> This is likely the root cause of the performance issues we saw in doing bulk 
> recompression of data in mirror maker.
> The mismatch between the InputStream and OutputStream interfaces and the 
> Message/MessageSet interfaces which are based on byte buffers is the cause of 
> many of these.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to