jackrabbit-dev 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: (JCR-2218) NodeEntryImpl.getWorkspaceId() very inefficient
Date Thu, 06 Aug 2009 10:50:14 GMT

    [ https://issues.apache.org/jira/browse/JCR-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739985#action_12739985
] 

Michael Dürig commented on JCR-2218:
------------------------------------

Another alternative approach (due to Angela): Instead of constructing the ids from the parent
 id and the name (which is quite expensive), traverse up to either root or a uuid and collect
the respective path elements. The use the root or the uuid respectively and the collected
path elements to construct the id.

> NodeEntryImpl.getWorkspaceId() very inefficient 
> ------------------------------------------------
>
>                 Key: JCR-2218
>                 URL: https://issues.apache.org/jira/browse/JCR-2218
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-jcr2spi
>            Reporter: Michael Dürig
>
> NodeEntryImpl.getWorkspaceId() calculates its path on each call by calling itself recursively.
Further each call to getWorkspaceId() results in various calls to the path and item factories
which might be somewhat expensive by themselves. 
> In my test scenario I have a RepositoryService.getItemInfos() call returning ~1000 items.
Processing these items results in about 2700000 (!) calls to getWorkspaceId(). Profiler data
shows, that 98% of the time to process the 1000 items is spent in getWorkspaceId()  and related
calls. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message