[ 
https://issues.apache.org/jira/browse/OAK-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556379#comment-13556379
 ] 

Stefan Guggisberg commented on OAK-567:
---------------------------------------

bq. The org.apache.jackrabbit.mk.model.tree.DiffBuilder is very slow because it 
uses:
bq. HashMap<NodeState, String>

i agree that needs to be fixed. i've refactored the DiffBuilder code from the 
mk diff method implementation into a separate class. the original 
implementation used the the (content hash) id's as keys (as documented inline).
however, during the refactoring i had to change to using NodeState instances 
(from the tree abstraction), which don't expose the id... :(

ideally the DiffBuilder should use the id's again.


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

Reply via email to