Good work! Sounds like an excellent strategy.

----
Sent from my phone
On Oct 12, 2011 11:58 PM, "Dileepa Jayakody" <[email protected]> wrote:

> Hi All,
>
> I am working on refactoring carbon-orbit bundles in the trunk with the
> intention of reducing the size of bulky bundles.
> As I went through some of the bundles, I found out few issues which make
> bundles unnecessarily bulky. The issues I identified include the following;
>
>    1. Unused jars embedded as dependencies in the bundle
>    2. Duplicated classes due to exploded jars (as a result of exported
>    packages form the bundle) and embedded dependencies
>
> The refactoring process I followed include the following steps.
>
>    1. Listing the orbit bundles in descending order of size to identify
>    bulky bundles
>    2. Scanning the bundle for unused jars as embedded dependencies and
>    duplicated classes in the bundle class-path: I used a tool called *JBoss
>    Tattletale 1.1.2* [1] to find unused, duplicated jars in the bundle
>    class-path
>     3. Removing unused embedded dependency jars from the pom.xml and
>    including bundle resources(.js, .swf, .xml files) in correct directory
>    structure
>    4. Testing the bundle in a Product via the carbon OSGI console. (To
>    test the bundles I used wso2gs-1.3.1 SNAPSHOT)
>
> I tested the first 5 bundles in descending order of size and re-factored
> the following bundles to reduce their size.
>
>     Bundle
>
> Prev. size
>
> New size
>
> What I did
>
> shindig-3.0.0
>
> 13.3 MB
>
> 10.9 MB
>
> Removed unused embedded dependencies: jstl-1.2, htmlunit-2.8,
> aopalliance-1.0
>
> Removed shindig-common, extras, gadgets, social-api and included their
> resources in the bundle class-path
>
> axis2_1.6.1
>
> 8.2 MB
>
> 6.1 MB
>
> Removed unused embedded dependency xmlbeans-2.3.0
>
> apacheds_1.5.7
>
> 7.2 MB
>
> 6.7 MB
>
> Removed unused embedded dependencies: shared-dsml-parser,
> shared-ldap-constants, shared-ldap-converter, apacheds-core-annotations,
> apacheds-interceptor-kerberos, apacheds-protocol-changepw,
> apacheds-protocol-dhcp, apacheds-protocol-dns, apacheds-protocol-ntp,
> apacheds-server-annotations, apacheds-server-jndi,
> apacheds-server-replication, apacheds-i18n
>
> I think this process can be used effectively when creating an orbit bundle
> by removing unused dependencies, duplicated jars etc, to make it as light as
> possible.
>
> [1] JBoss Tattletale:http://www.jboss.org/tattletale
> Tattletale gives a report on the project class-path and gives useful
> information about unused jars, duplicated jars, transient dependencies etc.
> It can be invoked as a third-party jar or as a maven plugin to generate the
> report. I can recommend this tool as a testing tool for developers creating
> orbit-bundles.
>
> Thanks,
> Dileepa
> --
> Dileepa Jayakody,
> Software Engineer, WSO2 Inc.
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to