kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guozhang Wang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-454) ProducerSendThread calls ListBuffer.size a whole bunch. That is a O(n) operation
Date Fri, 21 Apr 2017 22:55:04 GMT

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

Guozhang Wang resolved KAFKA-454.
---------------------------------
    Resolution: Won't Fix

> ProducerSendThread calls ListBuffer.size a whole bunch. That is a O(n) operation
> --------------------------------------------------------------------------------
>
>                 Key: KAFKA-454
>                 URL: https://issues.apache.org/jira/browse/KAFKA-454
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.7.1, 0.7.2, 0.8.0
>         Environment: NA
>            Reporter: Matthew Rathbone
>            Priority: Minor
>
> So there are various statements throughout the async code that call 'events.size', mostly
for debugging purposes.
> Problem is that this call is O(n), so it could add up if the batch size is high. (it's
a ListBuffer)
> I see this in at least ProducerSendThread, likely more. Will factor this out myself soon
when I start hacking on the project, just wanted to put this somewhere.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message