Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-454

ProducerSendThread calls ListBuffer.size a whole bunch. That is a O(n) operation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.7.1, 0.7.2, 0.8.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      NA

      Description

      So there are various statements throughout the async code that call 'events.size', mostly for debugging purposes.
      Problem is that this call is O, 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.

        Activity

        Hide
        jozi-k Jozef Koval added a comment -

        I think this will not fix as the class is deprecated and will be removed soon.

        Show
        jozi-k Jozef Koval added a comment - I think this will not fix as the class is deprecated and will be removed soon.
        Hide
        guozhang Guozhang Wang added a comment -

        Thanks for pointing out.

        Show
        guozhang Guozhang Wang added a comment - Thanks for pointing out.

          People

          • Assignee:
            Unassigned
            Reporter:
            rathboma Matthew Rathbone
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development