Hello.
I'm using AspectJ in a rather big project, and I'm getting an OutOfMemoryException during the compilation process. I only have one aspect defined, with only one pointcut, and some regular logging code on before() and after() advices.
This is a recurrent question, but so far I've only seen people recommending increasing the maximum amount of allocated memory through the -Xmx parameter. Indeed, this did solve my problem, but this is not really a good solution, since this code needs to
be built by a software factory that may be performing other (compilation) tasks at the same time...
I would like to know if there are any tips you can give me on how to lower the amount of memory needed by aspectj?
I read that using incremental compilation can consume more memory, but indeed I'm not using it --- well, at least I do not have the option specified in my pom.xml. Maybe I should explicitly include
<useIncrementalCompilation>false</useIncrementalCompilation> ?
I also guess that the way a pointcut is specified matters, that is, if using regular expressions * or .. may require more memory?
Any general tips you might have based on your past experiences?
Best regards,
Nuno
|