[
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731595#action_12731595
]
Benjamin Reed commented on ZOOKEEPER-472:
-----------------------------------------
i think we should expand this to not instantiate a hashmap for all zondes if
there aren't any children. it creates a fixed size overhead for all leaf nodes
and since there will always be more leaves than inner nodes, it is a none
trivial space saving. i think it could also speed serialization/deserialization
since it is faster to process a null then an empty hashmap. plus i think it
keeps the code simpler to not have a new class.
> Making DataNode not instantiate a HashMap when the node is ephmeral
> -------------------------------------------------------------------
>
> Key: ZOOKEEPER-472
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
> Project: Zookeeper
> Issue Type: Improvement
> Components: server
> Affects Versions: 3.1.1, 3.2.0
> Reporter: Erik Holstad
> Assignee: Erik Holstad
> Priority: Minor
> Fix For: 3.3.0
>
>
> Looking at the code, there is an overhead of a HashSet object for that nodes
> children, even though the node might be an ephmeral node and cannot have
> children.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.