[ 
https://issues.apache.org/jira/browse/DBCP-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Takayuki Kaneko updated DBCP-239:
---------------------------------

    Affects Version/s: 1.2.2

> Performance bottleneck on Abandoned Object Pool
> -----------------------------------------------
>
>                 Key: DBCP-239
>                 URL: https://issues.apache.org/jira/browse/DBCP-239
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2, 1.3
>            Reporter: Takayuki Kaneko
>         Attachments: patch.txt
>
>
> AbandonedObjectPool uses ArrayList as trace variable to manage connections.
> I found a bottleneck on it.
> returnObject(Object) has a synchronized block and it will be a bottleneck if 
> it manages a lot of connections.
> ArrayList#remove(Object) has to do arraycopy each time. It is tuned by native 
> code, but it is still slower than LinkedList#remove(Object).
> IMO, the list doesn't access by index, so LinkedList is better than ArrayList.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to