Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A73C95BD for ; Wed, 22 Feb 2012 08:07:13 +0000 (UTC) Received: (qmail 6137 invoked by uid 500); 22 Feb 2012 08:07:13 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 6073 invoked by uid 500); 22 Feb 2012 08:07:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 6063 invoked by uid 99); 22 Feb 2012 08:07:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 08:07:12 +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, 22 Feb 2012 08:07:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C7741334E95 for ; Wed, 22 Feb 2012 08:06:48 +0000 (UTC) Date: Wed, 22 Feb 2012 08:06:48 +0000 (UTC) From: "Knut Anders Hatlen (Commented) (JIRA)" To: derby-dev@db.apache.org Message-ID: <2079199753.3402.1329898008818.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-4633) Cache default calendar in result sets and statements on client driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213444#comment-13213444 ] Knut Anders Hatlen commented on DERBY-4633: ------------------------------------------- A good first step might be to run experiments to find out if fetching a large number of Time/Date/Timestamp objects via the client driver was slowed down between 10.5.3 and 10.6.2. If it turns out that the difference is small, it's probably better that we keep the code simple and don't add the extra complexity. > Cache default calendar in result sets and statements on client driver > --------------------------------------------------------------------- > > Key: DERBY-4633 > URL: https://issues.apache.org/jira/browse/DERBY-4633 > Project: Derby > Issue Type: Improvement > Components: JDBC, Network Client > Affects Versions: 10.6.1.0 > Reporter: Knut Anders Hatlen > Labels: derby_triage10_9 > > After the changes in DERBY-4582, these methods now allocate a default calendar object on each invocation (on the client driver), whereas they didn't before the fix: > ResultSet.getDate(int) > ResultSet.getTime(int) > ResultSet.getTimestamp(int) > PreparedStatement.setDate(int, java.sql.Date) > PreparedStatement.setTime(int, java.sql.Time) > PreparedStatement.setTimestamp(int, java.sql.Timestamp) > CallableStatement.getDate(int) > CallableStatement.getTime(int) > CallableStatement.getTimestamp(int) > The embedded driver prevents excessive allocation of default calendar objects in these methods by caching an instance in ConnectionChild (the super-class of EmbedResultSet, EmbedPreparedStatement and EmbedCallableStatement). We should do something similar on the client driver. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira