[jboss-dev] Further profling: Where should I focus?

Bill Burke bburke at redhat.com
Sun Jan 3 10:05:31 EST 2010



Brian Stansberry wrote:
> On 12/30/2009 06:22 PM, Bill Burke wrote:
>>
>> Ales Justin wrote:
>>>> IMO, we should just remove AOP entirely as our customers probably are
>>>>   not going to use it.
>>> This is exactly what will happen - remove AOP - if we disable it by
>>> default and re-write lifecycle handling to plain OO, w/o any costly
>>> pointcut matching.
>>>
>>> The only cost is lookup for potential @AOPEnable on the bean.
>>> While we still keep optional cool feature of creating an AOP proxy for a
>>> bean.
>>>
>>>> For @JMX just write another deployer and do it
>>>>   regularly.  Similarly with lifecycle and other features.
>>> Regularly?
>>> If you mean to register an mbean, that is actually not what we/users want.
>>> See my response to Dimitris this morning.
>>>
>> There probably is a way to make AOP irrelevant to boot performance, but
>> you need to consider pluses and minuses nevertheless...Everybody
>> (thousands) of users are effected by boot performance, while only a
>> handful care about @JMX, etc.
>>
> 
> True, but we use @JMX all over the place. I expect trying to get rid of 
> it and having all our POJO services register themselves in JMX will end 
> up sucking in most of the AS team, which will be a significant 
> distraction from EE 6 work. Personally I think we should explore further 
> whether this can be optimized before going down that path.
> 

This is something I wouldn't mind doing if Kabir finds that AOP can't be 
optimized.

>>> While this could be a deployer feature, I think it's far more complex to
>>> do it than tie it into the bean's lifecycle.
>>> e.g. scan for @JMX, remembering the handle, checking if it's overridden
>>> for an instance, ... while we already have all this implemented in
>>> bean's lifecycle handling, it's just not optimized yet.
>>>
>>> What do you mean by "similarly with lifecycle and other features"?
>>> @JMX, @JNDI, @Password, ... is the lifecycle callback.
>>>
>> All these annotations that trigger AOP.  Are they under the jboss
>> namespace?  Controlled by us?
>>
> 
> Yes.
> 
>> You might want to consider meta-annotations and turning @AOPEnabled into
>> one. i.e.
>>
>> @AOPEnabled
>> public @interface JMX {...}
>>
>> You look at the bean's class annotations, then look at those annotations
>> for @AOPEnabled.
>>
>>>> Again, if you want to take this route, I'd be happy to do the work.
>>>> I am willing to spend the next month on boot performance and AS.
>>> Excellent.
>>> So will I and the rest of MC team.
>> Well, I need to know what I could do to help.  Is Kabir fine on the AOP
>> stuff?  VFS3 seems to be ok?  What about removing JMX Kernel Backward
>> Compatibility and upgrading services to MC?  I can tackle any of these
>> problems with little guidance I just don't want to be duplicating any
>> work (like with the deployer sorting).
>>
> 
> Would converting mbean services help boot time, assuming that most still 
> need to expose a JMX interface, i.e. @JMX? Don't get me wrong, this is 
> something we need to do, but if your goal is to help boot perf I'm not 
> sure how much it will help.
> 
> The JIRA for the boottime improvements we discussed in July is 
> https://jira.jboss.org/jira/browse/JBAS-7329. What are we doing on 
> limiting the scanning of our own classes? I see a number of deployments 
> without a jboss-scanning.xml.
> 
> Alexey, could you use any help on XB optimization?
> 

Scanning and JAXB is not showing up as an issue yet on profiler runs. 
Its all AOP, Classloading (package names), and the 100k iterations on 
resolveContexts() (AOP and Classloading are currently taking > 50-60% of 
the time).  I have some pretty good ideas on how to fix 
resolveContexts() but really wanted to see the AOP/CL changes in there 
before I look at it.  I would also love to finish my fast-jaxb code 
generator, but IIRC, it won't shave off more than a second or two.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com



More information about the jboss-development mailing list