Erik, if you'd like enter a JIRA and take a whack at it go ahead. Perhaps a subclass of DataNode specific for ephemerals? That way it can handle any particulars - and should also minimize the number of "if(children==null)" type checks that would be needed. (don't neg. impact performance or b/w compat though). You would probably learn more about zk internals, testing, etc... in the process.


Mahadev Konar wrote:
Hi Erik,
  I am not sure if that would a considerable opitmization but even if you
wanted to do it, it would be much more than just adding a check in the
constructor (the serialization/deserialization would need to have
specialized code). Right now all the datanodes are treated equally for
ser/derser and other purposes.


On 7/14/09 1:42 PM, "Erik Holstad" <> wrote:

I'm not sure if I've miss read the code for the DataNode, but to me it looks
like every node gets a set of children even though it might be an
ephemeral node which cannot have children, so we are wasting 240 B for every
one of those. Not sure if it makes a big difference, but just thinking
that since everything sits in memory and there is no reason to instantiate
it, maybe it would be possible just to add a check in the constructor?

Regards Erik

Reply via email to