You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Erik Holstad (JIRA)" <ji...@apache.org> on 2009/09/27 22:08:15 UTC
[jira] Commented: (ZOOKEEPER-536) the initial size of the hashsets
for the watcher is too large
[ https://issues.apache.org/jira/browse/ZOOKEEPER-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760092#action_12760092 ]
Erik Holstad commented on ZOOKEEPER-536:
----------------------------------------
I think it would be possible to take the same approach as I did in https://issues.apache.org/jira/browse/ZOOKEEPER-472,
to instantiate the hashmap, when the first watcher is set. For both issues I guess it might make sense to create a smaller
map when actually instantiating too, maybe 8 or so.
Erik
> the initial size of the hashsets for the watcher is too large
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-536
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-536
> Project: Zookeeper
> Issue Type: Improvement
> Reporter: Benjamin Reed
>
> setting a watches on a lot of different nodes can be expensive if there is only one watch set on each node. by default the hashset we use to track watches has 16 entries and takes up about 160 bytes. we should probably make the initial size much lower.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.