You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "LiAoNan (Jira)" <ji...@apache.org> on 2021/01/14 06:30:00 UTC
[jira] [Created] (ZOOKEEPER-4057)
NIOServerCnxnFactory.selectorThreads,using List instead of HashSet is
better
LiAoNan created ZOOKEEPER-4057:
----------------------------------
Summary: NIOServerCnxnFactory.selectorThreads,using List instead of HashSet is better
Key: ZOOKEEPER-4057
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4057
Project: ZooKeeper
Issue Type: Improvement
Reporter: LiAoNan
{code:java}
private final Set<SelectorThread> selectorThreads = new HashSet<SelectorThread>();
{code}
Using List costs less memory and computing than HashSet.
{code:java}
private final List<SelectorThread> selectorThreads = new ArrayList<>();
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)