[Design of AOP on JBoss (Aspects/JBoss)] - AOPConstructorJoinpoint and methodHasSubInstanceMetaData
by adrian@jboss.org
While looking at this issue:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=139622
I noticed something funny.
These are showing up as a minor hotspot during a boot/shutdown of jboss
| java.lang.Class.getMethod(Class.java:1581)
| org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:146)
| org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:276)
| org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:160)
| org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasSubInstanceMetaData(AOPConstructorJoinpoint.java:172)
| org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.rootHasMethodWithSubInstanceMetaData(AOPConstructorJoinpoint.java:150)
| org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.rootHasSubInstanceMetaData(AOPConstructorJoinpoint.java:130)
| org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:93) org.jboss.beans.info.plugins.AbstractBeanInfo.newInstance(AbstractBeanInfo.java:269)
| org.jboss.beans.info.plugins.AbstractBeanInfo.newInstance(AbstractBeanInfo.java:263)
|
| java.lang.Class.getMethod(Class.java:1581) org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:146) org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:276) org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:160) org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getMetaDataMethodAnnotationDependencies(AOPDependencyBuilder.java:234) org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getMethodAnnotationDependencies(AOPDependencyBuilder.java:211) org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getAnnotationDependencies(AOPDependencyBuilder.java:154) org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getDependencies(AOPDependencyBuilder.java:132) org.jboss.kernel.plugins.dependency.DescribeAction.uninstallActionInternal(DescribeAction.java:94) org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:157)
|
What's funny is I'm also seeing this
| java.lang.Throwable.fillInStackTrace(Throwable.java:Unknown line)
| java.lang.Throwable.<init>(Throwable.java:196)
| java.lang.Exception.<init>(Exception.java:41)
| java.lang.NoSuchMethodException.<init>(NoSuchMethodException.java:32)
| java.lang.Class.getMethod(Class.java:1581) org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:146) org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:276) org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:160) org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasSubInstanceMetaData(AOPConstructorJoinpoint.java:172) org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.rootHasMethodWithSubInstanceMetaData(AOPConstructorJoinpoint.java:150)
|
NOTE: This is just using hprof to run cpu samples,
so I'm guessing the reason for the hotspot is that it is constructing
the exception a lot.
The sampling (at 10ms intervals) caught it 5 times in the example I'm quoting from.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166179#4166179
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166179
17 years, 8 months
[Design the new POJO MicroContainer] - ComponentMetaDataRetrieval - performance
by adrian@jboss.org
So I've been fnally got around to looking at some performance bottlenecks.
I've started with the component metadata retrieval problem
mentioned by Ales on a different thread.
The issue here appears to be a lot of calls of type Class.getMethod() and
Method.getParameterTypes() even though for the first, the Method
is already known when you construct the Signature and for the second
it isn't always necessary to know the exact parameters.
The same is true for Constructors and Fields.
As a performance improvement, I'm going to introduce some caching
of the Member object to reduce this work
and make the retrieval of parameter(types) lazy.
One downside of this optimization is that it will no longer check whether
the method really exists on the class if you pass in the method.
i.e. instead of getting back a null you will
get back some empty metadata if you are stupid in the parameters you pass. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166173#4166173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166173
17 years, 8 months
[Design of JBoss Portal] - Re: Coordination work
by julien@jboss.com
is it configurable from XML already ?
"bdaw" wrote : "julien(a)jboss.com" wrote : Is the alias implementation started (Map<QName, Set>) ? I haven't seen sample yet.
|
| Yes. its in CoordinationConfigurator:
|
|
| | /**
| | * Set alias binding for a given page. If alias with given name already exists it will be overwritten
| | *
| | * @param page
| | * @param aliasName
| | * @param qnames
| | * @throws IllegalCoordinationException
| | */
| | void setAliasBinding(Page page, String aliasName, Set<QName> qnames) throws IllegalCoordinationException;
| |
| | /**
| | * Removes alias binding
| | *
| | * @param aliasInfo
| | * @throws IllegalCoordinationException
| | */
| | void removeAliasBinding(AliasBindingInfo aliasInfo) throws IllegalCoordinationException;
| |
| | /**
| | * @param page
| | * @return collection of alias bindings connected to the given page
| | */
| | Collection<AliasBindingInfo> getAliasBindings(Page page);
|
| So at the moment the alias String name maps Set in scope of page. Should the alias name be QName rather?
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166090#4166090
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166090
17 years, 8 months