harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4950) [classlib][performance] read property file from jar file is very slow at first time
Date Wed, 17 Oct 2007 09:31:50 GMT

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


Mime
View raw message