<i18n dev> RFR: 8288979: Improve CLDRConverter run time [v2]

Roger Riggs rriggs at openjdk.org
Wed Jun 22 17:30:51 UTC 2022


On Wed, 22 Jun 2022 17:07:11 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java line 146:
>> 
>>> 144:             // generic reduction of duplicated values
>>> 145:             Map<String, Object> newMap = new HashMap<>(map);
>>> 146:             Map<BundleEntryValue, BundleEntryValue> dedup = new HashMap<>(map.size());
>> 
>> LinkedHashMap could be used to retain the iteration order.
>> Or TreeMap if some deterministic order was desirable.
>
> True. Which raises the question: do we need any arbitrary order? The original code used a hashmap too. It preserved the original order only when no duplicates were detected.

A stable order is useful when comparing between builds (by a human). 
It also supports the goal of reproducible builds.
@naotoj  What do you think?

-------------

PR: https://git.openjdk.org/jdk/pull/9243


More information about the i18n-dev mailing list