You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Yisong Yue (JIRA)" <ji...@apache.org> on 2018/06/13 20:45:00 UTC

[jira] [Created] (ZOOKEEPER-3063) track outstanding changes with ArrayDeque

Yisong Yue created ZOOKEEPER-3063:
-------------------------------------

             Summary: track outstanding changes with ArrayDeque
                 Key: ZOOKEEPER-3063
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3063
             Project: ZooKeeper
          Issue Type: Improvement
          Components: server
            Reporter: Yisong Yue
            Assignee: Yisong Yue
             Fix For: 3.6.0


Outstanding changes are tracked with an ArrayList, which has O(n) remove from head (and possibly add) performance. This means that as we get further behind, we will slow down the processing of outstanding changes, which would make us get further behind.
We should switch to using ArrayDeque which achieves O(1) add and remove on both ends, which should result in much happiness.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)