geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (XBEAN-208) DelegatingBundle performance issues
Date Thu, 09 Aug 2012 21:08:18 GMT

    [ https://issues.apache.org/jira/browse/XBEAN-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432151#comment-13432151
] 

Jarek Gawor edited comment on XBEAN-208 at 8/9/12 9:07 PM:
-----------------------------------------------------------

Committed performance improvements in revision 1371482.

Resource lookups (getResource()) are now cached in LRU cache. The default cache is of size
250. That size can be changed via a system property: org.apache.xbean.osgi.bundle.util.DelegatingBundle.resourceCacheSize.
If the system property is set to -1 (or less then 0) then no caching will be done.

For class loading (loadClass()), the DelegatingBundle will now build package to bundle mapping
which will be used to quickly lookup a bundle from which to load a class from a given package.
This optimization can be turn off by setting org.apache.xbean.osgi.bundle.util.DelegatingBundle.packageCache=false
system property.

                
      was (Author: gawor@mcs.anl.gov):
    Committed performance improvements in revision 1371482.

Resource lookups (getResource()) are now cached in LRU cache. The default cache is of size
250. That size can be changed via a system property: org.apache.xbean.osgi.bundle.util.DelegatingBundle.resourceCacheSize.
If the system property is set to -1 (or less then 0) then no caching will be done.

For class loading (loadClass()), the DelegatingBundle will now build package to bundle mapping
which will be used to quickly lookup a bundle from which to load a class from a given package.


                  
> DelegatingBundle performance issues
> -----------------------------------
>
>                 Key: XBEAN-208
>                 URL: https://issues.apache.org/jira/browse/XBEAN-208
>             Project: XBean
>          Issue Type: Improvement
>          Components: bundleutils
>    Affects Versions: 3.11
>            Reporter: Jarek Gawor
>            Assignee: Jarek Gawor
>
> DelegatingBundle suffers from some performance issues when loading classes or looking
up resources. 
> The getResource() can be slow because each lookup can cause a lookup on each bundle that
DelegatingBundle delegates to.
> The loadClass() can be slow for the same reason as getResource() and because PackageAdmin
(which can be very slow) is used to lookup a bundle for a given package. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message