> right... but i don't see why we have to recalculate the path
> when the node states already know about them and we usually
> do know the path of an immutable tree because we have
> traversed to there using the TreeLocations.

the problem is, only the KernelNodeState knows about its path,
but none of the other five classes implementing NodeState do.

> IMO we should have NodeState#getPath but as long as we don't
> have that i will need sort of workaround to have an efficient
> way to handle ImmutableTree#getPath.

AFAIU, NodeState was specifically designed to not require a path.

how about caching the path in ImmutableTree? IIUC this tree
implementation works on top of NodeStates, which means the
path will never change, right?

Regards
 Marcel 

Reply via email to