[
https://issues.apache.org/jira/browse/DERBY-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-5947:
--------------------------------------
Issue & fix info: (was: Patch Available)
Thanks, Dag. I've committed the 1a and 2a patches to trunk (r1399139 and
r1399140).
I think there is still some code that could be factored out from the generated
doExecute() method. Initialization of the BaseActivation.resultSet field is one
thing. Maybe the authorization checks could be moved from byte code to Java
code as well. I'll give it a try.
> Factor out common code from generated classes
> ---------------------------------------------
>
> Key: DERBY-5947
> URL: https://issues.apache.org/jira/browse/DERBY-5947
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d5947-1a-remove-common-methods.diff,
> d5947-2a-execute-method.diff, natural-join-decompiled.txt,
> values1-after-1a.txt, values1-after-2a.txt, values1-decompiled.txt
>
>
> There's some code that's added to all classes generated by Derby's query
> compiler. For example, there are three static fields that contain statistics
> used to check if the plan is stale, and there are getter and setter methods
> for each of the three fields. The fields and their accessor methods take up
> 468 bytes in every generated class.
> We should see if we can factor out some of this code so that there is a
> single shared copy in BaseActivation. Advantages would be: less complicated
> byte-code generation, less memory occupied by generated classes in the
> statement cache, smaller disk footprint for stored prepared statements.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira