Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 26378 invoked from network); 28 Nov 2006 20:51:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 20:51:44 -0000 Received: (qmail 80979 invoked by uid 500); 28 Nov 2006 20:51:52 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 80952 invoked by uid 500); 28 Nov 2006 20:51:52 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 80943 invoked by uid 99); 28 Nov 2006 20:51:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 12:51:52 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 12:51:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 409C97142F8 for ; Tue, 28 Nov 2006 12:51:22 -0800 (PST) Message-ID: <29120620.1164747082262.JavaMail.jira@brutus> Date: Tue, 28 Nov 2006 12:51:22 -0800 (PST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2122) Optimize ContainerLock.isCompatible() In-Reply-To: <17558296.1164740064057.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/DERBY-2122?page=comments#action_12454117 ] Knut Anders Hatlen commented on DERBY-2122: ------------------------------------------- Thanks Mike, that's a good point. Perhaps it would be even better if we left the 2-d arrays and built the bit masks from them at initialization time. > Optimize ContainerLock.isCompatible() > ------------------------------------- > > Key: DERBY-2122 > URL: http://issues.apache.org/jira/browse/DERBY-2122 > Project: Derby > Issue Type: Improvement > Components: Store, Performance > Affects Versions: 10.2.1.6 > Reporter: Knut Anders Hatlen > Assigned To: Knut Anders Hatlen > Priority: Trivial > Attachments: derby-2122-v1.diff, derby-2122-v1.stat > > > The numbers at http://wiki.apache.org/db-derby/Derby1961MethodCalls indicate that ContainerLock.isCompatible() is called many times per transaction, at least when there are multiple concurrent clients operating on the same containers. Currently, it looks into a two-dimensional array to find out whether two locks are compatible. This could be implemented more efficiently, for instance by having a bit pattern in each ContainerLock object representing which lock types it is compatible with. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira