[
https://issues.apache.org/jira/browse/KAFKA-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marko Milenkovic resolved KAFKA-1607.
-------------------------------------
Resolution: Duplicate
It is duplicate of KAFKA-1351, sorry!
> Use of String format method in debug statements
> -----------------------------------------------
>
> Key: KAFKA-1607
> URL: https://issues.apache.org/jira/browse/KAFKA-1607
> Project: Kafka
> Issue Type: Improvement
> Affects Versions: 0.8.1.1
> Reporter: Marko Milenkovic
> Priority: Minor
>
> Some classes in {{kafka.producer}} package use {{String.format}} which is
> very slow operation. String.format is going to be evaluated even debug is not
> enabled and it affects performance.
> for example:
> * {{kafka.producer.BrokerPartitionInfo}} line 41
> {code}
> debug("Getting broker partition info for topic %s".format(topic))
> {code}
> * {{kafka.producer.async.DefaultEventHandler}} line 62
> {code}
> debug("Handling %d events".format(events.size))
> {code}
> those lines are just an example, there are few more places where logs are
> evaluated. Removing those debug statements from the code I got 3 times better
> producer performance.
> Can you please check
--
This message was sent by Atlassian JIRA
(v6.2#6252)