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

Use ArrayList instead of LinkedList in Sensor Class

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Since this collection is going to be bulk-built once and not modified, better to use an ArrayList since its memory requirements are smaller and it is much faster here... just instantiate the internal array once and fill it... as opposed to LinkedList that must build the nodes for each item inserted. ArrayList is also faster for iteration.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                belugabehr David Mollitor
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: