Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4057

NIOServerCnxnFactory.selectorThreads,using List instead of HashSet is better

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      private final Set<SelectorThread> selectorThreads = new HashSet<SelectorThread>();
      

      Using List costs less memory and computing than HashSet.

      private final List<SelectorThread> selectorThreads = new ArrayList<>();
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lan_ok LiAoNan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m