You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Marth (JIRA)" <ji...@apache.org> on 2013/11/07 14:25:18 UTC

[jira] [Updated] (OAK-652) ItemImpl.checkProtected() is too slow

     [ https://issues.apache.org/jira/browse/OAK-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Marth updated OAK-652:
------------------------------

    Fix Version/s: 0.14

> ItemImpl.checkProtected() is too slow
> -------------------------------------
>
>                 Key: OAK-652
>                 URL: https://issues.apache.org/jira/browse/OAK-652
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Jukka Zitting
>              Labels: performance
>             Fix For: 0.14
>
>
> As mentioned in http://markmail.org/message/6jktvy53wqyhxlht, with the current node type code the {{ItemImpl.checkProtected()}} call is pretty expensive. I profiled simple {{addNode}} and {{setProperty}} calls and got the following results (showing relative time spent in each method):
> {code}
> org.apache.jackrabbit.oak.jcr.NodeImpl.addNode
>   61% org.apache.jackrabbit.oak.jcr.SessionDelegate.perform
>   39% org.apache.jackrabbit.oak.jcr.ItemImpl.checkProtected
> org.apache.jackrabbit.oak.jcr.NodeImpl.setProperty
>  100% org.apache.jackrabbit.oak.jcr.NodeImpl.internalSetProperty
>    55% org.apache.jackrabbit.oak.jcr.ItemImpl.checkProtected
>    45% org.apache.jackrabbit.oak.jcr.SessionDelegate.perform
> {code}
> By keeping explicit track of effective node types and item definitions we could probably drive down the cost at least one order of magnitude, but as mentioned on oak-dev@ I'd rather avoid the call entirely since the relevant constraints are in any case checked during save().
> This issue exists to track either the removal or optimization of the checkProtected(), depending on what consensus we reach.



--
This message was sent by Atlassian JIRA
(v6.1#6144)