Originally posted by Lasse Koskela:
With a static pointcut, the AOP framework doesn't need to consider the execution context since the pointcut is specified in terms of static structure (e.g. "all methods that start with the letters t-e-s-t").
With a dynamic pointcut, the AOP framework determines at runtime whether an aspect should be applied based on the execution context (e.g. "all methods that start with the letters t-e-s-t and one of the method call arguments is null").
That's not too bad of a description...
The key thing to take away here is that Spring AOP is able to apply aspects to static pointcuts at startup time, because it knows everything it needs to know to be able to do the weaving. This means that at runtime AOP has no significant performance hit for static pointcuts.
But dynamic pointcuts can't be applied until runtime, because the info needed isn't available until runtime. So, dynamic pointcuts have a small performance implication.