Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-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 680D4E4A7 for ; Mon, 18 Mar 2013 20:15:20 +0000 (UTC) Received: (qmail 87511 invoked by uid 500); 18 Mar 2013 20:15:19 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 87453 invoked by uid 500); 18 Mar 2013 20:15:19 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 87319 invoked by uid 99); 18 Mar 2013 20:15:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 20:15:19 +0000 Date: Mon, 18 Mar 2013 20:15:18 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OPENJPA-2353) Reduce object allocations 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/OPENJPA-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605578#comment-13605578 ] ASF subversion and git services commented on OPENJPA-2353: ---------------------------------------------------------- Commit 1457967 from curtisr7 [ https://svn.apache.org/r1457967 ] OPENJPA-2353: Reduce object allocations in BrokerImpl.initializeOperatingSet(). > Reduce object allocations > ------------------------- > > Key: OPENJPA-2353 > URL: https://issues.apache.org/jira/browse/OPENJPA-2353 > Project: OpenJPA > Issue Type: Improvement > Components: kernel, performance > Affects Versions: 2.3.0, 2.2.2 > Reporter: Rick Curtis > Assignee: Rick Curtis > Priority: Minor > Fix For: 2.2.2 > > > While trolling through some object allocation profiles I found two places that we can greatly reduce object allocations for most applications. > The first is in BrokerImpl.initializeOperatingSet(). In this method we ALWAYS create a new IdentityMap, regardless of whether we use it or not. This map is used for cascading operations and isn't used otherwise. > The second improvement comes in when initializing a new Entity. During loading of an Entity, we will allocation three BitSets, one to keep track of clean fields, one for dirty, and another for flushed fields. In the event that we don't dirty / flush anything for a given Entity the dirty and flushed BitSets are a waste. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira