Kafka
  1. Kafka
  2. KAFKA-455

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.7.1, 0.7.2, 0.8.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
    • Environment:
      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.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        32d 22h 50m 1 Joel Koshy 11/Sep/12 21:30
        Resolved Resolved Closed Closed
        645d 7h 46m 1 Neha Narkhede 19/Jun/14 05:17
        Tony Stevenson made changes -
        Workflow Apache Kafka Workflow [ 13051107 ] no-reopen-closed, patch-avail [ 13053523 ]
        Tony Stevenson made changes -
        Workflow no-reopen-closed, patch-avail [ 12720501 ] Apache Kafka Workflow [ 13051107 ]
        Neha Narkhede made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Joel Koshy made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Duplicate [ 3 ]
        Hide
        Joel Koshy added a comment -

        dup of KAFKA-456

        Show
        Joel Koshy added a comment - dup of KAFKA-456
        Matthew Rathbone created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Matthew Rathbone
          • Votes:
            0 Vote for this issue
            Watchers:
            1 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

                Development