db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-2920) Share code between readExternal() and readExternalFromArray()
Date Fri, 02 Nov 2012 15:45:12 GMT

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

Mike Matrigali commented on DERBY-2920:
---------------------------------------

I worry about adding extra method calls in this area, but admit it has been a long time and
many jvm versions ago since I looked
at performance resulst in this area.  The issue here is that this is a very high traffic routine.
 
For instance I think the worst case would be  the case of a 10 collumn row and looking at
1 million rows this change may add
1 million extra function calls.  Maybe JIT fixes, not sure.  

I also wonder if we lose performance by moving the routines out of final classes.

I know some code duplication was added in the area of read and write external in the past
as the result of performance tuning.  
                
> Share code between readExternal() and readExternalFromArray()
> -------------------------------------------------------------
>
>                 Key: DERBY-2920
>                 URL: https://issues.apache.org/jira/browse/DERBY-2920
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services, SQL
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_10
>         Attachments: d2920-1a.diff
>
>
> Most of the implementations of DataValueDescriptor.readExternalFromArray(ArrayInputStream)
are identical to their corresponding Externalizable.readExternal(ObjectInput) methods. Since
ArrayInputStream implements ObjectInput, readExternalFromArray() could in those cases just
have forwarded calls to readExternal() instead of duplicating the code. A default forwarding
implementation of readExternalFromArray() could be placed in org.apache.derby.iapi.types.DataType,
and all the existing implementations, except those with optimizations for ArrayInputStream,
could be removed.

--
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