[
https://issues.apache.org/jira/browse/OAK-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557085#comment-13557085
]
Stefan Guggisberg commented on OAK-567:
---------------------------------------
the problem IMO is that DiffBuilder uses the tree abstraction (NodeState et al,
OAK-3) instead of StoredNode as in the original implementation. NodeState hides
the internal content-hash identifier which is central feature of this
microkernel implementation.
i'd rather change NodeBuilder to use the internal StoredNode objects again.
alternatively, we could provide another implementation leveraging the
content-hash identifiers of stored nodes.
> DiffBuilder performance problem
> -------------------------------
>
> Key: OAK-567
> URL: https://issues.apache.org/jira/browse/OAK-567
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: mk
> Reporter: Thomas Mueller
> Attachments: OAK-567.patch
>
>
> The org.apache.jackrabbit.mk.model.tree.DiffBuilder is very slow because it
> uses:
> {code}
> HashMap<NodeState, String>
> {code}
> and at the same time
> {code}
> class AbstractNodeState implements NodeState {
> /**
> * Returns a hash code that's compatible with how the
> * {@link #equals(Object)} method is implemented. The current
> * implementation simply returns zero for everything since
> * {@link NodeState} instances are not intended for use as hash keys.
> *
> * @return hash code
> */
> @Override
> public int hashCode() {
> return 0;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira