commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-352) Repeated calls to getMetadata in a transaction leads to performance degredation
Date Tue, 01 Feb 2011 14:53:29 GMT

    [ https://issues.apache.org/jira/browse/DBCP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989226#comment-12989226
] 

Gary Gregory commented on DBCP-352:
-----------------------------------

If you can make your example use an H2 (or any) in-memory database, it will be easier to reproduce
and test for anyone. I suppose Derby would do the trick as well but I know from experience
that H2 works great for standalone unit tests.

> 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.4
>         Environment: PostgreSQL, MySQL, JDK 1.6
>            Reporter: Derek Hulley
>            Priority: Critical
>         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

        

Mime
View raw message