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] [Commented] (DERBY-6075) Use modern collections in impl/sql/compile
Date Mon, 25 Mar 2013 08:17:17 GMT

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

Knut Anders Hatlen commented on DERBY-6075:
-------------------------------------------

I reran the experiment with more data points and more iterations (ran the test 100 times per
revision). Averages are shown below. Numbers are in milliseconds, so lower is better.

10.9.1.0   -   12936 (baseline)
r1398952   -   13017 (baseline + 0.6%)  - before DERBY-5947
r1412577   -   12402 (baseline - 4.1%)  - after DERBY-5947
r1413586   -   11761 (baseline - 9.1%)  - before DERBY-6003
r1426151   -   11275 (baseline - 12.8%) - after DERBY-6003
r1448025   -   11065 (baseline - 14.5%) - before DERBY-6075
10.10.1.1  -   11054 (baseline - 14.5%) - including most of DERBY-6075

It looks like DERBY-5947 and DERBY-6003 indeed did improve compilation speed. The numbers
also suggest that some other changes may have contributed to the improvements in 10.10. And
any improvements caused by the changes in this issue are indistinguishable from noise.

In any case, it looks like we're heading in the right direction with 10.10. :)
                
> Use modern collections in impl/sql/compile
> ------------------------------------------
>
>                 Key: DERBY-6075
>                 URL: https://issues.apache.org/jira/browse/DERBY-6075
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: Compile.java, d6075-10a-aggregate-vectors.diff, d6075-11a-remaining-vectors.diff,
d6075-12a-stack.diff, d6075-13a-unused-properties.diff, d6075-14a-dead-syntax.diff, d6075-15a-sqlgrammar-vectors.diff,
d6075-16a-negative-test.diff, d6075-17a-rename-aggregate-vectors.diff, d6075-1a-CollectNodesVisitor.diff,
d6075-2a-bindExpression.diff, d6075-3a-javadoc.diff, d6075-4a-parameterList.diff, d6075-5a-ordering.diff,
d6075-6a-DMLModStatementNode.diff, d6075-7a-more-signatures.diff, d6075-8a-local-hashtables.diff,
d6075-9a-hashtable-fields.diff
>
>
> The code in the org.apache.derby.impl.sql.compile package predates the Java Collections
Framework and uses old-style collections like java.util.Vector and java.util.Hashtable. Since
the old-style collection classes are used in many method signatures, it's difficult to use
modern collection classes when adding new code.
> I suggest we switch to using interfaces (like java.util.List and java.util.Map) instead
of specific classes in the signatures, so that we have more flexibility in choosing the right
collection class for the job.
> Only changing the signatures would allow us to continue using Vector and Hashtable, since
they implement the interfaces. However, I think it would be good to switch to ArrayList and
HashMap in a second step. The instances in impl/sql/compile are not shared between threads,
so we don't need the synchronization provided by the old-style classes. Switching to unsynchronized
classes may make compilation slightly faster.

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