harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Pavlenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory
Date Tue, 13 Feb 2007 08:23:05 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472566
] 

Andrey Pavlenko commented on HARMONY-2752:
------------------------------------------

Below is the same reproducer, but in this example all Harmony text API replaced with ICU API.
This test fails with OOME on RI with -Xmx16m.

import java.util.Locale;

import junit.framework.TestCase;

import com.ibm.icu.text.Collator;
import com.ibm.icu.text.RuleBasedCollator;

public class TextTest extends TestCase {

    public void test() {
        Locale[] locales = Locale.getAvailableLocales();
        String rules = "";
        System.out.println("total " + locales.length + " locales");

        for (int j = 0; j < locales.length; j++) {
            Locale locale = locales[j];
            RuleBasedCollator collator = (RuleBasedCollator) Collator
                    .getInstance(locale);
            rules = collator.getRules();
            System.out.println("" + locale + "\t" + rules.length());
            try {
                collator = new RuleBasedCollator(rules);
            } catch (Exception e) { /* ignore */
            }
        }
    }
}

> [classlib][text] RulesBasedCollator uses too much memory
> --------------------------------------------------------
>
>                 Key: HARMONY-2752
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2752
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windowx Xp i686
>            Reporter: Salikh Zakirov
>         Attachments: Coll.java
>
>
> The attached test Coll.java exercises constructor of java.text.RulesBasedCollator,
> by getting the rules from the all available locales, and the creating the new collator
from the same rules.
> With J9 + Harmony, the test fails with OutOfMemoryError on heap size -Xmx16m, and passes
on 32m
> With DRLVM, the test fails on heap sizes 16m and 32m, and passes on 64m
> On Hotspot and JRockit, the test passes even with -Xmx16m

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


Mime
View raw message