You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Pervov (JIRA)" <ji...@apache.org> on 2009/01/14 13:41:00 UTC

[jira] Commented: (HARMONY-6039) Implement on-demand class library parsing to avoid unnecessary jar/zip parsing during startup

    [ https://issues.apache.org/jira/browse/HARMONY-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663734#action_12663734 ] 

Pavel Pervov commented on HARMONY-6039:
---------------------------------------

Wenlong,

It is unlucky I didn't look into your patch earlier. Below is my understanding of the patch. I hilight things I do not agree with.

You keep mapping file in lib/boot directory while this is DRLVM specific properties file and hence it should be kept in DRLVM directory.

Thus you hardcode deployed JRE structure into the code. At the moment, none of DRLVM code knows of jre/lib directory layout.

You keep mapping cache global and turn off on-demand parsing as soon as one module changes - its time or size change. Module changes happen quite often as class library is now in active development and bugs are fixed often. This makes the feature useless for development scenarios. If it would be possible to invalidate pre-module and rebuild module package info in this case - this would make the feature more usefull.

APR_CREATE | APR_TRUNCATE is meaningless as create always truncates the file. 

'// 2000 bytes is enough to hold the mapping info for any module' You certainly know what 'software security' and 'buffer overflow' mean?

More to come...

> Implement on-demand class library parsing to avoid unnecessary jar/zip parsing during startup
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6039
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6039
>             Project: Harmony
>          Issue Type: Improvement
>          Components: VM
>         Environment: Conduct experiments on Windows XP, Core 2 Quad-core machine
>            Reporter: Wenlong Li
>            Assignee: Xiao-Feng Li
>         Attachments: h6039.patch_1, H6039.patch_2, H6039_on_demand_library_parsing_patch, instrumentation_code, On-demand runtime library loading_1, On-demand runtime library loading_2, on_demand_patch
>
>
> During VM creation, Harmony will parse all class libraried defined in bootclasspath.properties under jre/lib/boot directory. However, not all class libraries are accessed during startup. That means, it is not necessary to open and resolve all these class libraries.
> In this patch, I implement the on-demand jar parsing. I leverage the class library info defined in the manifest file of each module. For a request class, if it is not available in existing class table, I then parse its class library info, and check which module contains this requested class. That is, I parse the class library on demand.
> Using on-demand class library parsing, I can reduce the VM creation time from 20+ seconds to 3 seconds.
> I enable this feature into reading boot class path option, and it can be disabled by using -Xbootclasspath option. 

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