You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Regis Xu (JIRA)" <ji...@apache.org> on 2007/10/16 11:43:50 UTC

[jira] Created: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time

[classlib][performance]  read property file from jar file is very slow at first time
------------------------------------------------------------------------------------

                 Key: HARMONY-4950
                 URL: https://issues.apache.org/jira/browse/HARMONY-4950
             Project: Harmony
          Issue Type: Improvement
            Reporter: Regis Xu


below is test case:
=============start=============
Properties pro = new Properties();
         URL url = new

URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
         InputStream in = url.openStream();
         long start = System.currentTimeMillis();
         pro.load(in);
         long end = System.currentTimeMillis();
         System.out.println("time: " + (end - start));
         in.close();

         pro = new Properties();
         url = new

URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
         in = url.openStream();
         start = System.currentTimeMillis();
         pro.load(in);
         end = System.currentTimeMillis();
         System.out.println("time: " + (end - start));
         in.close();
=================end===============

output of ri:
time: 1
time: 0

output of harmony:
time: 231
time: 1 

clearly, there is huge space to improve, maybe it's problem from archive or io module.

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


[jira] Closed: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time

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

Regis Xu closed HARMONY-4950.
-----------------------------

    Resolution: Cannot Reproduce

> [classlib][performance]  read property file from jar file is very slow at first time
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4950
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4950
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Regis Xu
>
> below is test case:
> =============start=============
> Properties pro = new Properties();
>          URL url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          InputStream in = url.openStream();
>          long start = System.currentTimeMillis();
>          pro.load(in);
>          long end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
>          pro = new Properties();
>          url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          in = url.openStream();
>          start = System.currentTimeMillis();
>          pro.load(in);
>          end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
> =================end===============
> output of ri:
> time: 1
> time: 0
> output of harmony:
> time: 231
> time: 1 
> clearly, there is huge space to improve, maybe it's problem from archive or io module.

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


[jira] Commented: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time

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

Regis Xu commented on HARMONY-4950:
-----------------------------------

Thanks remind, Sergey!! 
Yes, as you say, it is not reasonable to say the performance is low just from one invoke time, so i closed it. 

> [classlib][performance]  read property file from jar file is very slow at first time
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4950
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4950
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Regis Xu
>
> below is test case:
> =============start=============
> Properties pro = new Properties();
>          URL url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          InputStream in = url.openStream();
>          long start = System.currentTimeMillis();
>          pro.load(in);
>          long end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
>          pro = new Properties();
>          url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          in = url.openStream();
>          start = System.currentTimeMillis();
>          pro.load(in);
>          end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
> =================end===============
> output of ri:
> time: 1
> time: 0
> output of harmony:
> time: 231
> time: 1 
> clearly, there is huge space to improve, maybe it's problem from archive or io module.

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


[jira] Commented: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time

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

Regis Xu commented on HARMONY-4950:
-----------------------------------

i run the test on Ubuntu 7.04

> [classlib][performance]  read property file from jar file is very slow at first time
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4950
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4950
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Regis Xu
>
> below is test case:
> =============start=============
> Properties pro = new Properties();
>          URL url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          InputStream in = url.openStream();
>          long start = System.currentTimeMillis();
>          pro.load(in);
>          long end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
>          pro = new Properties();
>          url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          in = url.openStream();
>          start = System.currentTimeMillis();
>          pro.load(in);
>          end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
> =================end===============
> output of ri:
> time: 1
> time: 0
> output of harmony:
> time: 231
> time: 1 
> clearly, there is huge space to improve, maybe it's problem from archive or io module.

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


[jira] Commented: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time

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

Sergey Dmitriev commented on HARMONY-4950:
------------------------------------------

Thanks for catching!

Regis, I just wanted to note that 231 VS 0 can not show the picture as it is because of currentTimeMillis() granularity. Here is the javadoc's quote:

    public static long currentTimeMillis()

    Returns the current time in milliseconds. Note that while the unit of time of the return
    value is a millisecond, the granularity of the value depends on the underlying operating
    system and may be larger. For example, many operating systems measure time in
    units of tens of milliseconds.


And the second point can be connected to JIT compilation. The better way to make it would be to have some statistical data with respect to this. But I cannot figure right now how to do it.


> [classlib][performance]  read property file from jar file is very slow at first time
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4950
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4950
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Regis Xu
>
> below is test case:
> =============start=============
> Properties pro = new Properties();
>          URL url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          InputStream in = url.openStream();
>          long start = System.currentTimeMillis();
>          pro.load(in);
>          long end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
>          pro = new Properties();
>          url = new
> URL("jar:file:/home/bahamut/harmony/trunk/deploy/jdk/jre/lib/boot/jndi.jar!/jndi.properties");
>          in = url.openStream();
>          start = System.currentTimeMillis();
>          pro.load(in);
>          end = System.currentTimeMillis();
>          System.out.println("time: " + (end - start));
>          in.close();
> =================end===============
> output of ri:
> time: 1
> time: 0
> output of harmony:
> time: 231
> time: 1 
> clearly, there is huge space to improve, maybe it's problem from archive or io module.

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