db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Date Tue, 20 Dec 2005 15:48:32 GMT
     [ http://issues.apache.org/jira/browse/DERBY-774?page=all ]

Dyre Tjeldvoll updated DERBY-774:
---------------------------------

    Attachment: derby-774.diff
                derby-774.stat

I don't have derbyall_report.txt available, but Knut-Anders promises that he has run derbyall
cleanly with this patch. 
As always; a committer's attention would be welcome. Thanks.

> 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


Mime
View raw message