[jboss-dev] Further profling: Where should I focus?
Kabir Khan
kabir.khan at jboss.com
Wed Dec 23 17:19:42 EST 2009
On 23 Dec 2009, at 20:31, Ales Justin wrote:
>> I could also volunteer to work on removing AOP
>> dependencies that currently exist for some components.
>
> With your AOP background, I think you would be a perfect fit to do this.
>
> I don't think we actually use any direct AOP proxying.
> We mostly "abuse" AOP for lifecycle callbacks.
> e.g. @JMX or @JNDI usage
I think you're right, a quick look at AS trunk shows the main bindings to come from messaging (which I assume is compile-time woven?), ejb 3 (which uses the domains to construct the containers), and this in bootstrap/aop.xml:
<bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
<constructor>
<parameter><![CDATA[
<aop>
<aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
<bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
<advice name="process" aspect="mainDeployer"/>
</bind>
<aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
<bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
<advice name="setValue" aspect="persist"/>
</bind>
</aop>]]>
</parameter>
</constructor>
I think Scott can shed some light on these aspects, but IIRC proxies for these are created by explicitly calling AOPProxyFactory since what is intercepted is not installed as MC beans.
>
> Dunno how much of this is really AOP code beyond the pointcut matching.
For the lifecycle callbacks AOP is really just used for pointcut matching, and could be simplified a lot since we're only really interested in if a class has a particular annotation, not the full pointcut stuff. It should be possible to just have a simple map of annotations and corresponding lifecycle callbacks which should be a lot simple/faster than doing this.
Bill, did you make any measurements with AOP being turned off by default? ATM every bean is checked for bindings unless @DisableAOP is specified, it should probably be the other way round.
> We talked about changing this (at AS6 meeting) to plain OO,
> but I guess this could all be optimized with more optimized pointcut
> matching -- afaik, Flavia already did this (for her MSc), it just never
> saw the light of day properly.
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
More information about the jboss-development
mailing list