You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/07/29 23:08:38 UTC

[GitHub] [commons-dbcp] garydgregory commented on issue #20: Performance Enhancement: Call toArray with Zero Array Size

garydgregory commented on issue #20: Performance Enhancement: Call toArray with Zero Array Size
URL: https://github.com/apache/commons-dbcp/pull/20#issuecomment-516195728
 
 
   @DaGeRe Note that `org.apache.commons.dbcp2.DelegatingResultSet` is an implementation of JDBC's `ResultSet` interface, so the code you point out does get invoked.
   
   What might use some bullet-proofing, is adding a try-catch block around the `close()` call in the loop such that we close as much as we can. The issue then becomes of how to represent that more than one exception was thrown in the loop. 
   
   WRT to using a 0-size array in the allocation, I am not sure that can have a measurable effect since we are dealing with database connections here, which are inherently slow(ish).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services