[
https://issues.apache.org/jira/browse/DERBY-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475048#comment-13475048
]
Rick Hillegas commented on DERBY-5947:
--------------------------------------
I agree with Bryan that we should eliminate as much byte code generation as
possible. In the early days of Cloudscape, we were generating a lot more byte
code for DDL statements--for no good reason. That is why the ConstantActions
exist: to eliminate the need to generate obscure byte code for operations which
don't need it.
I think the major value of byte code generation is that it eliminates the cost
of using reflection to call user-written code for functions, procedures, types,
and (soon) aggregates. Maybe reflection has become tolerably cheap on modern
JVMs and we could reconsider the need for invoking user-written logic via
generated byte code.
I think there are other operations for which we generate byte code in order to
eliminate reflection.
> 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
>
> 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