harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wenlong Li (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6039) Implement on-demand class library parsing to avoid unnecessary jar/zip parsing during startup
Date Wed, 14 Jan 2009 04:28:59 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Wenlong Li updated HARMONY-6039:

    Attachment: h6039.patch_1

This patch automatically produces the mapping info between module and its exported libraries.
Also all code update happens in VM side.

This philosophy behind this optimization is (1) check whether the mapping info exists, if
not, then generate the info during the first run of Harmony; (2) if the mapping info exists,
then setup a software cache to buffer this mapping. Later when a class is requested, its package
name (library name) is extracted to lookup the software cache. (3) if there is a hit, then
the module is parsed to provide request class. (4) if miss, then the user class loader is
responsible for the class loading. Please be noted generating the mapping info in first run
is pretty low overhead, and can be ignored. While utilizing such mapping info, perhaps the
most important is to reduce the memory footprint in addtion to the startup time. 

In next step, I will add support for (1) if third library changes over time, and user does
in-place harmony update, then the mapping info should be updated correspondingly; (2) if a
new module is added to the boot class, I should capture the mapping info for new modules.


> Implement on-demand class library parsing to avoid unnecessary jar/zip parsing during
> ---------------------------------------------------------------------------------------------
>                 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_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.

View raw message