[
https://issues.apache.org/jira/browse/KAFKA-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guozhang Wang updated KAFKA-2882:
---------------------------------
Assignee: Maksim Logvinenko (was: Neha Narkhede)
> Add constructor cache for Snappy and LZ4 Output/Input stream in
> Compressor.java
> -------------------------------------------------------------------------------
>
> Key: KAFKA-2882
> URL: https://issues.apache.org/jira/browse/KAFKA-2882
> Project: Kafka
> Issue Type: Improvement
> Components: consumer, producer
> Affects Versions: 0.8.2.1
> Reporter: Maksim Logvinenko
> Assignee: Maksim Logvinenko
> Fix For: 0.9.0.1
>
>
> In `wrapForOutput` and `wrapForInput` methods of
> `org.apache.kafka.common.record.Compressor`, `Class.forName("[compression
> codec]")` and `getConstructor` methods are invoked for each `wrapForOutput` /
> `wrapForInput` call. Reflection calls are expensive and impact performance at
> high volumes. This patch adds a cache for `Constructor` to reduce the
> reflection overhead.
> In our production deployments, this has reduced producer CPU usage by about
> 20%
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)