[ 
https://issues.apache.org/jira/browse/DERBY-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dag H. Wanvik updated DERBY-774:
--------------------------------

    Derby Categories: [Performance]

> DRDAConnThread::doneData should use statically allocated SQLException objects
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-774
>                 URL: https://issues.apache.org/jira/browse/DERBY-774
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Server
>         Environment: Any
>            Reporter: Dyre Tjeldvoll
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.2.1.6
>
>         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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to