db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5947) Factor out common code from generated classes
Date Fri, 12 Oct 2012 14:15:02 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475008#comment-13475008
] 

Bryan Pendleton commented on DERBY-5947:
----------------------------------------

Byte code generation is one of the most arcane parts of Derby; anything that can reduce
or simplify the byte code gets a big +1 from me.

In some ideal future, I'd love to see a version of Derby where there was no byte code
generation at all; either because we'd eliminated it entirely (in favor of an interpreter?),
or because it was at least an option and you could choose to execute your queries
some other way.

In addition to making it easier for casual users to comprehend the details of Derby
query execution, this would also, I think, simplify some of our security policies, and
possibly make it so that we could run Derby in other Java environments, such as Android.

                
> 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

Mime
View raw message