Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F1B96F88 for ; Tue, 14 Jun 2011 20:32:30 +0000 (UTC) Received: (qmail 45623 invoked by uid 500); 14 Jun 2011 20:32:30 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 45592 invoked by uid 500); 14 Jun 2011 20:32:30 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 45584 invoked by uid 99); 14 Jun 2011 20:32:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2011 20:32:30 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2011 20:32:23 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QWaHK-0001q6-W6 for users@openjpa.apache.org; Tue, 14 Jun 2011 13:32:02 -0700 Date: Tue, 14 Jun 2011 13:32:02 -0700 (PDT) From: Pinaki Poddar To: users@openjpa.apache.org Message-ID: <1308083522976-6475817.post@n2.nabble.com> In-Reply-To: <4DF773FE.4080902@cambridgesemantics.com> References: <4DF773FE.4080902@cambridgesemantics.com> Subject: Re: Speeding up commit MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, For batch insertion, 1. Set openjpa.RetainState=false this might gain few extra cycles I had introduced a tentative option [1] for automatic detachment (your observation of cycles being spent on StateManager.proxyFields(...) is related to detachment process that OpenJPA runtime invokes at user-configurable points in the lifetime of a persistence context such as transaction endpoints or when EntityManager.close() is called). If the user application does not intend to refer to the managed entities later (as it seems to fits the use case you are describing), then we can bypass the overhead of detachment. In a quick Person-has-many-Address type model, I notice a ~20% reduction in data insert with this new NONE option. To access, and if possible verify efficacy of this new feature, please do the following 1. get a nightly build or build from trunk locally. 2. Ensure that revision 1135776 is included. Easy way to do this $ java -jar openjpa.jar will print the latest revision included in the jar 3. In user application, em.setProperty("openjpa.AutoDetach", AutoDetachType.NONE); Note that the option must be set on an instantiated EntityManager, and *not* in persistence.xml [1] https://issues.apache.org/jira/browse/OPENJPA-2017 ----- Pinaki -- View this message in context: http://openjpa.208410.n2.nabble.com/Speeding-up-commit-tp6474341p6475817.html Sent from the OpenJPA Users mailing list archive at Nabble.com.