jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-3440) MemoryNodeBuilder creates superfluous instances of ConnectedHead
Date Wed, 23 Sep 2015 15:01:04 GMT

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

Michael Dürig commented on OAK-3440:

I think functionally the patch is fine. However I find the code clearer and cleaner without
the patch as
* incrementing {{rootHead.revision}} is encapsulated in {{ConnectedHead}}.
* The code in {{UnconnectedHead.getMutableNodeState()}} somewhat resembles that in {{UnconnectedHead.update()}}.

As {{MemoryNodeBuilder}} is a complex beast that took several refactorings to get it right
and balance readability and performance, I'd prefer to leave it as is unless we have a convincing
reason otherwise. AFAIC modern JVMs are quite good at handling 'throw away' instance. In this
case it will probably even get 'hotspotted away'.

> MemoryNodeBuilder creates superfluous instances of ConnectedHead
> ----------------------------------------------------------------
>                 Key: OAK-3440
>                 URL: https://issues.apache.org/jira/browse/OAK-3440
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Francesco Mari
>            Priority: Minor
>         Attachments: OAK-3440-01.patch
> MemoryNodeBuilder creates a throw-away instance of ConnectedHead when a MutableNodeState
is requested to an UnconnectedHead. The throw-away ConnectedHead could be spared by simplifying

This message was sent by Atlassian JIRA

View raw message