views:

697

answers:

2

Does anyone have an experience with pure AspectJ load time weaving in production systems (mostly interesting Tomcat related activities)? I'm slightly worrying regarding memory footprint and cpu overhead.

+2  A: 

I wouldn't imagine that it'd have a significantly different impact to other AOP-related libraries like cglib, which we use a lot in production systems for AOP proxy generation in Spring. The performance is fine, but there is an increased memory footprint in the permgen pool (due to a large number of synthetic classes being generated), which can be a problem if not managed carefully.

skaffman
My two cents for AspectJ. Version 1.6.4 with LTW option eat initially about 60-80Mbs RAM for my tomcat application. In version 1.6.5 option "typeDemotion" for decreasing memory footprint. Details are here - http://andrewclement.blogspot.com/2009/04/aspectj-load-time-weaving-and-memory.html
FoxyBOA
+1  A: 

I would encourage you to do compile time weaving for aspectj. You can do that in your build with ant or maven and in development in Eclipse with the AJDT plugin.

Load time weaving works in tomcat. I had a production system running for some months but switching to compile time weaving made configuration and maintenance a lot easier.

Thomas Einwaller
Can I ask you why you decided to switch to compile time weaving? Any issues with memory footprint/CPU performance?
FoxyBOA
as skaffman already said the memory footprint increased a bit but we did not experience any problems with CPU usage
Thomas Einwaller