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 "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2019/04/09 15:18:00 UTC

[jira] [Commented] (OAK-8209) Improve Node.isNodeType(String) performance

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

Marcel Reutegger commented on OAK-8209:
---------------------------------------

Proposed changes are on GitHub: https://github.com/apache/jackrabbit-oak/compare/trunk...mreutegg:OAK-8209

The changes on NodeImpl only have a minor impact but still prevent creating objects unnecessarily. The more important change with more impact on performance is in WorkspaceImpl. The ReadWriteNodeTypeManager now remembers the Tree at {{/jcr:system/jcr:nodeTypes}}. I'm a bit rusty with the exact semantics of Trees, but AFAIU this is fine because a Tree reflects changes that may happen underneath. The Root from which the Tree was previously acquired on each call is always the same. The root in SessionDelegate is final. That is, the ReadWriteNodeTypeManager can just as well remember the Tree.

[~mduerig], could you have a quick look and let me know what you think?

> Improve Node.isNodeType(String) performance
> -------------------------------------------
>
>                 Key: OAK-8209
>                 URL: https://issues.apache.org/jira/browse/OAK-8209
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>
> Profiling an application running on Oak showed calls to {{Node.isNodeType(String)}} as one of the hot spots. While it may be possible to reduce those calls there's probably also some potential in optimizing the implementation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)