commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takayuki Kaneko (JIRA)" <>
Subject [jira] Created: (DBCP-239) Performance bottleneck on Abandoned Object Pool
Date Sun, 02 Sep 2007 16:49:19 GMT
Performance bottleneck on Abandoned Object Pool

                 Key: DBCP-239
             Project: Commons Dbcp
          Issue Type: Improvement
    Affects Versions: 1.3
            Reporter: Takayuki Kaneko

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.

View raw message