Erik Holstad commented on ZOOKEEPER-536:

I think it would be possible to take the same approach as I did in 
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.


> 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.

Reply via email to