You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Salikh Zakirov (JIRA)" <ji...@apache.org> on 2006/12/15 15:52:21 UTC

[jira] Created: (HARMONY-2752) [classlib][nio] RulesBasedCollator uses too much memory

[classlib][nio] RulesBasedCollator uses too much memory
-------------------------------------------------------

                 Key: HARMONY-2752
                 URL: http://issues.apache.org/jira/browse/HARMONY-2752
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windowx Xp i686
            Reporter: Salikh Zakirov


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478010 ] 

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

I've created a ticket in the ICU bug tracking system http://bugs.icu-project.org/trac/ticket/5630

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


[jira] Commented: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (HARMONY-2752) [classlib][nio] RulesBasedCollator uses too much memory

Posted by "Salikh Zakirov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2752?page=all ]

Salikh Zakirov updated HARMONY-2752:
------------------------------------

    Attachment: Coll.java

> [classlib][nio] RulesBasedCollator uses too much memory
> -------------------------------------------------------
>
>                 Key: HARMONY-2752
>                 URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472254 ] 

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

This constructor just creates an instance of com.ibm.icu.text.RuleBasedCollator(rules) , so I suppose it's icu issue.

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


[jira] Updated: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2752?page=all ]

Paulex Yang updated HARMONY-2752:
---------------------------------

    Summary: [classlib][text] RulesBasedCollator uses too much memory  (was: [classlib][nio] RulesBasedCollator uses too much memory)

> [classlib][text] RulesBasedCollator uses too much memory
> --------------------------------------------------------
>
>                 Key: HARMONY-2752
>                 URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2752) [classlib][text] RulesBasedCollator uses too much memory

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison updated HARMONY-2752:
---------------------------------


Just reproducing the ICU team comment here for convenience.  They closed it as won't fix.

"This works as designed. Some of the rules can get really large and complicated. If you want a collator that works with less memory, don't use the rules and open a collator based on the locale."

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