From dev-return-24859-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Aug 06 10:56:30 2009 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 8059 invoked from network); 6 Aug 2009 10:56:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Aug 2009 10:56:30 -0000 Received: (qmail 25030 invoked by uid 500); 6 Aug 2009 10:56:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 24951 invoked by uid 500); 6 Aug 2009 10:56:36 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 24943 invoked by uid 99); 6 Aug 2009 10:56:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2009 10:56:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2009 10:56:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E3B80234C04B for ; Thu, 6 Aug 2009 03:56:14 -0700 (PDT) Message-ID: <1869154385.1249556174931.JavaMail.jira@brutus> Date: Thu, 6 Aug 2009 03:56:14 -0700 (PDT) From: =?utf-8?Q?Michael_D=C3=BCrig_=28JIRA=29?= To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2218) NodeEntryImpl.getWorkspaceId() very inefficient In-Reply-To: <1713789777.1247752934828.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2218?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Michael D=C3=BCrig updated JCR-2218: ------------------------------- Attachment: JCR-2218.patch Proposed patch implementing the approach from my last comment. While this s= houldn't have any negative performance impact on flat hierarchies, it shows= an overall (*) performance gain up to 20% on deep hierarchies.=20 (*) Session.getItem() on a deep hierarchy.=20 > NodeEntryImpl.getWorkspaceId() very inefficient=20 > ------------------------------------------------ > > 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=C3=BCrig > Attachments: JCR-2218.patch > > > NodeEntryImpl.getWorkspaceId() calculates its path on each call by callin= g itself recursively. Further each call to getWorkspaceId() results in vari= ous calls to the path and item factories which might be somewhat expensive = by themselves.=20 > In my test scenario I have a RepositoryService.getItemInfos() call return= ing ~1000 items. Processing these items results in about 2700000 (!) calls = to getWorkspaceId(). Profiler data shows, that 98% of the time to process t= he 1000 items is spent in getWorkspaceId() and related calls.=20 --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.