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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8.0
    • 0.8.0
    • core
    • NA

    Description

      Hi all,

      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 (x4), likely more. Will factor this out myself soon when I start hacking on the project, just wanted to put this somewhere.

      Attachments

        1. KAFKA-456.patch
          0.8 kB
          David Arthur

        Activity

          People

            mumrah David Arthur
            rathboma Matthew Rathbone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified