Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 92534 invoked from network); 2 Feb 2011 11:01:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 11:01:54 -0000 Received: (qmail 26677 invoked by uid 500); 2 Feb 2011 11:01:54 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 26367 invoked by uid 500); 2 Feb 2011 11:01:51 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 26342 invoked by uid 99); 2 Feb 2011 11:01:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 11:01:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 11:01:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 08D0618AF81 for ; Wed, 2 Feb 2011 11:01:29 +0000 (UTC) Date: Wed, 2 Feb 2011 11:01:29 +0000 (UTC) From: "Derek Hulley (JIRA)" To: issues@commons.apache.org Message-ID: <2092535279.4824.1296644489032.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1621484529.2652.1296571528962.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (DBCP-352) Repeated calls to getMetadata in a transaction leads to performance degredation 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/DBCP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989597#comment-12989597 ] Derek Hulley commented on DBCP-352: ----------------------------------- Phil's suggested fix for DBCP-330 will also address this problem. > Repeated calls to getMetadata in a transaction leads to performance degredation > ------------------------------------------------------------------------------- > > Key: DBCP-352 > URL: https://issues.apache.org/jira/browse/DBCP-352 > Project: Commons Dbcp > Issue Type: Bug > Affects Versions: 1.2.2, 1.3.1, 1.4 > Environment: PostgreSQL, MySQL, JDK 1.6 > Reporter: Derek Hulley > Priority: Critical > Fix For: 1.3.1, 1.4.1 > > Attachments: DBCPMetadataTest.zip > > > During long-running transactions that utilize conditional logic based on the database metadata, it is possible to get thousands of calls to Connection.getMetaData. An ArrayList is built up containing objects which are never removed (this is the cause of DBCP-330). However, the array is shared with all other PreparedStatements, so the array scan and modification time keeps rising as the transaction progresses. > I will attempt to attach an Eclipse project; profiling (or even a few JStacks) will show that most of the time is spent scanning the cluttered and growing array for objects to remove. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira