harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5882) [classlib][pack200] Performance improvements for pack200
Date Tue, 24 Jun 2008 02:27:46 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607449#action_12607449

Nathan Beyer commented on HARMONY-5882:

Interfaces (java.util.List) are preferred over implementations (java.util.ArrayList) for type

Rather than creating the NOT_FOUND List, try using Collections.EMPTY_LIST.

I prefer to use 'collection.isEmpty()' over 'collection.size() == 0' for testing a collection
to see if it's empty.

The 'CachedArray' class creates one HashMap for 'primaryTable' in the initializer and one
HashMap in the constructor, which just overwrites the previously created instance.

The method 'cacheArray(String[])' method throws an Error, which are rarely, if ever thrown.
Since this is a somewhat public API, I think an IllegalArgumentException would better fit
the intention.

Are the scopes appropriate on this new class? Does it need to be public? The default (package-private)
scope seems more appropriate.

> [classlib][pack200] Performance improvements for pack200
> --------------------------------------------------------
>                 Key: HARMONY-5882
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5882
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 HEAD
>            Reporter: Andrew Cornwall
>         Attachments: main.patch, test.patch
> Attached are some performance improvements for Pack200. They do two things:
>  1. Remove unnecessary conversions to UTF-8 in CPUTF8
>  2. Cache array lookup in SegmentConstantPool
> Hope they work - this is my first try at applying a fix since I've forked.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message