You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "Jarek Gawor (JIRA)" <ji...@apache.org> on 2012/08/09 23:06:19 UTC

[jira] [Commented] (XBEAN-208) DelegatingBundle performance issues

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

Jarek Gawor commented on XBEAN-208:
-----------------------------------

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