Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Question about weaving principles

Eric Bodden wrote:
> First of all am I right that in the current implementation the major
> loop is as follows?
> 
> - over all classes
>    - over all joinpoints (modulo FastMatch)
>      - for each joinpoint shadow
>        - if pointcut matches shadow
>          - implement (weave)

Close.  There are two levels of loading a class.  First we make a JavaClass
which is very cheap.  This is used for fastMatch.  If any shadow mungers
could still match after fastMatch then we generate a LazyClassGen.  This can
be much more expensive.

> If that is correct, I assume that every class that if given as input is
> loaded even it it is not matched by any pointcut, right?

This is right, but only loaded as a JavaClass which is cheap.

> Also I don't understand the notion of a shadowmunger 100%. Am I right
> that a shadowmunger represents actually the pointcut and so is an entity
> to implement the pointcut attached to it?

A ShadowMunger is an object that can transform one or more join point
shadows.  ShadowMungers contain Pointcuts that are used for matching, and
when they match a shadow they also contain code to implement some sort of
transformation.

> What exactly is "concretize()" good for? And briefly, how does it work?

concretize is used on Pointcuts to resolve references to named pointcuts.
This shouldn't be too hard to follow in the code.

> Also: Do you have any information about where most time is spent at the
> moment during weaving? Is classloading, weaving or matching pointcuts
> the bottleneck?

If you want to work on improving weave-time performance, your first step
needs to be writing a couple of benchmarks to answer this question.  You're
in luck and Noel Markham (working with Matthew Webster) has written such a
set of benchmarks that I'm hoping will be committed to the tree real soon
now.  These will hopefully give you a good base-line.

-Jim 




Back to the top