You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org> on 2005/12/19 16:59:30 UTC
[jira] Created: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
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
Assigned to: Knut Anders Hatlen
Priority: Minor
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
Re: [jira] Updated: (DERBY-774) DRDAConnThread::doneData should use
statically allocated SQLException objects
Posted by "Bernt M. Johnsen" <Be...@Sun.COM>.
>>>>>>>>>>>> Bernt M. Johnsen wrote (2005-12-20 21:44:23):
> >>>>>>>>>>>> Dyre Tjeldvoll (JIRA) wrote (2005-12-20 16:48:32):
> > [ 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.
>
> You've got the attenion ;-)
The patch needs a comment that explains why static exceptions are
desirable and why it is ok to use static exceptions in this particluar
case.
Otherwise: ok.
--
Bernt Marius Johnsen, Database Technology Group,
Sun Microsystems, Trondheim, Norway
Re: [jira] Updated: (DERBY-774) DRDAConnThread::doneData should use
statically allocated SQLException objects
Posted by "Bernt M. Johnsen" <Be...@Sun.COM>.
>>>>>>>>>>>> Dyre Tjeldvoll (JIRA) wrote (2005-12-20 16:48:32):
> [ 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.
You've got the attenion ;-)
>
> > 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
>
--
Bernt Marius Johnsen, Database Technology Group,
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway
[jira] Updated: (DERBY-774) DRDAConnThread::doneData should use
statically allocated SQLException objects
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-774?page=all ]
Knut Anders Hatlen closed DERBY-774:
------------------------------------
Fixed in revision 358560.
> 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
> Fix For: 10.2.0.0
> 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
[jira] Updated: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
[ 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
[jira] Updated: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
[ 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
[jira] Resolved: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-774?page=all ]
Bernt M. Johnsen resolved DERBY-774:
------------------------------------
Fix Version: 10.2.0.0
Resolution: Fixed
> 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
> Fix For: 10.2.0.0
> 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
[jira] Updated: (DERBY-774) DRDAConnThread::doneData should use statically allocated SQLException objects
Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-774?page=all ]
Dyre Tjeldvoll updated DERBY-774:
---------------------------------
Attachment: (was: derby-774.diff)
> 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.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