You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Marko Milenkovic (JIRA)" <ji...@apache.org> on 2014/08/21 16:06:11 UTC
[jira] [Created] (KAFKA-1607) Use of String format method in debug
statement
Marko Milenkovic created KAFKA-1607:
---------------------------------------
Summary: Use of String format method in debug statement
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)