db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-2920) Share code between readExternal() and readExternalFromArray()
Date Mon, 05 Nov 2012 10:13:11 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-2920:

    Attachment: ReadInts.java

Thanks, Mike. I was wondering about that myself, so I had started a test run with the attached
ReadInts test class. The test is similar to what you suggested, but the table was smaller
(3 integer columns, 10000 rows).

After 100 runs with trunk and 100 runs with the patch (each run performs a full table scan
20000 times for warmup and 10000 times while collecting data), I found that on average there
was a 0.02% difference. That is, no measurable difference. This was with JDK 7u9 on Solaris

I'll change the size of the test table to 10x1000000 and see if that changes anything.
> 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, 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

View raw message