geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevan Miller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (XBEAN-156) BundleClassLoader.getResource() lookup is slow
Date Wed, 15 Sep 2010 03:19:33 GMT

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

Kevan Miller commented on XBEAN-156:
------------------------------------

Simple matter to cache the wired bundles. I don't see the harm in this. We need to test a
number of scenarios with wired bundles stopping/starting, etc, but I don't see how caching
the wired bundles, here, will make matters any worse.

BTW, You can avoid a fair number of getResource() calls by explicitly configuring various
jaxb/jaxp Factory's. E.g.:

GERONIMO_OPTS="-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration
-Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl
-Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory
-Djavax.xml.datatype.DatatypeFactory=com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
"  ./geronimo run --long

This still leaves about 3 getResource() calls - two in Pluto and one in OpenEJB. We don't
want to use global properties, like that, but it's a good data point. Calls to BundleUtils.getWiredBundles()
seem to be pretty expensive. Even caching the result won't be enough, IMO. So, we'll need
to investigate minimizing the number of calls and/or improving the performance of the getWiredBundles()
calls...

> BundleClassLoader.getResource() lookup is slow
> ----------------------------------------------
>
>                 Key: XBEAN-156
>                 URL: https://issues.apache.org/jira/browse/XBEAN-156
>             Project: XBean
>          Issue Type: Bug
>          Components: bundleutils
>    Affects Versions: 3.8
>            Reporter: Jarek Gawor
>            Assignee: Kevan Miller
>
> When looking up META-INF/services resources, the BundleClassLoader obtains a list of
bundles wired to the bundle of the classloader in order to check each wired bundle for the
given resource. The problem is that the process of figuring out the list of wired bundles
is performed each time a lookup on META-INF/services resource is done and the process of getting
the wired bundles itself can be pretty slow. 
> The BundleClassLoader probably needs a better algorithm for getting the wired bundles.

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


Mime
View raw message