Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 88100 invoked from network); 21 Dec 2005 13:17:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Dec 2005 13:17:54 -0000 Received: (qmail 95536 invoked by uid 500); 21 Dec 2005 13:17:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 95507 invoked by uid 500); 21 Dec 2005 13:17:53 -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 95489 invoked by uid 99); 21 Dec 2005 13:17:53 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 05:17:52 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 9F3FDDE for ; Wed, 21 Dec 2005 14:17:31 +0100 (CET) Message-ID: <35922485.1135171051651.JavaMail.jira@ajax.apache.org> Date: Wed, 21 Dec 2005 14:17:31 +0100 (CET) From: "Dyre Tjeldvoll (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects In-Reply-To: <12554092.1135007970959.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-774?page=all ] Dyre Tjeldvoll updated DERBY-774: --------------------------------- Attachment: derby-774.diff New patch with comment, (as suggested by Bernt Johnsen) > DRDAConnThread::doneData should use statically allocated SQLException objects > ----------------------------------------------------------------------------- > > Key: DERBY-774 > URL: http://issues.apache.org/jira/browse/DERBY-774 > Project: Derby > Type: Improvement > Components: Network Server, Performance > Environment: Any > Reporter: Dyre Tjeldvoll > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: derby-774.diff, derby-774.stat > > DRDAConnThread::doneData currently creates a new SQLException object that is passed to the writeSQLCAGRP() method. Profiling shows that the creation of these Exception objects takes a lot of CPU because the Throwable constructor will call fillInStackTrace(), which is expensive. This is unnecessary since the exception is not being thrown, and the stack trace is never used. > It would be sufficient to keep a static SQLException instance in DRDAConnThread that could be reused each time doneData() is called (this is also suggested by the following comment in the code: > // sqlstate 02000 for end of data. > // RESOLVE: Need statics for sqlcodes." > Assigning to Knut-Anders, since he has the patch ready (?) in his sandbox. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira