[
https://issues.apache.org/jira/browse/DERBY-2920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-2920:
--------------------------------------
Attachment: ReadInts2.java
The attached ReadInts2 class is the updated test which scans a table with
10x1000000 integers. I ran it in the same environment as the previous test
(Solaris 11, x86, JDK 7u9, 64-bit server VM). This time I had it running
overnight so that I got 300 runs with a clean trunk and 300 runs with the
patch. On average, the test ran 0.12% slower with the patch, so there was
virtually no difference.
> 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, ReadInts2.java, ReadInts.java
>
>
> 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