From dev-return-35312-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Tue Jun 12 08:05:47 2012 Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 072C29653 for ; Tue, 12 Jun 2012 08:05:47 +0000 (UTC) Received: (qmail 93243 invoked by uid 500); 12 Jun 2012 08:05:45 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 92951 invoked by uid 500); 12 Jun 2012 08:05:45 -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 92907 invoked by uid 99); 12 Jun 2012 08:05:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 08:05:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 395C3141BF8 for ; Tue, 12 Jun 2012 08:05:44 +0000 (UTC) Date: Tue, 12 Jun 2012 08:05:44 +0000 (UTC) From: "Alex Parvulescu (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <162614640.6375.1339488344237.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1399302221.2863.1339426483211.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (JCR-3335) Reduce synchronized block scope when loading a node by id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293428#comment-13293428 ] Alex Parvulescu commented on JCR-3335: -------------------------------------- > you replace the 'updateCache' method with 'getEntries'. I'm not actually replacing the 2 calls, I'm only reducing the mirrored code, and merging the 2 similar 'getEntries' methods together. And like you've noticed this has the added benefit that it loads the node outside the read lock. > Reduce synchronized block scope when loading a node by id > --------------------------------------------------------- > > Key: JCR-3335 > URL: https://issues.apache.org/jira/browse/JCR-3335 > Project: Jackrabbit Content Repository > Issue Type: Sub-task > Reporter: Alex Parvulescu > Attachments: CachingEntryCollector.java.patch > > > This is a small(ish) change that takes the 'getNodeById' cll outside of the synchronized block that wraps the cache access. > I see the load call as a heavy one, and the proposed change offers better concurrency behavior. > In the tests that I ran, mostly related to queries I got a 20% improvement on average query response time. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira