I was wondering if there are any major performance issues with using AspectJ if it is being used to intercept every (or just most) method in an application. Of course, performance would also be affected by the advice that got executed on every interception.
For the sake of this example, let's say its very simple advice that runs very quickly and with minimal overhead/no memory leaks. Are there still significant performance killers since every method is being intercepted?
It certainly won't accelerate your code. I've seen horrible results where 19 stackframes had been added between a caller and a callee for an otherwise direct rapid event handling method. Suffice to say AOP is dead in my mind.
If you are lucky, you may have compiled code, which is inlined by the jit compiler and merely adds the actual work you chose to add as if you wrote it in place. Worst cases, like the spring/osgi crap out there, you end up with some unusable snail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With