Hi Rajendra. Thanks for the question and the hep dump screenshot. Compile time weaving (CTW) would not solve your latency problem. In comparison to load time weaving (LTW) you would only save time for class-loading during application start-up. After LTW is done, the application's performance should be the same as with CTW.
Memory consumption and performance impact of AspectJ are strongly correlated with what your aspects do and how broadly they are applied to the target classes. So I am afraid without seeing your aspect code nobody will be able to help you. The number of aspects, pointcuts and advice is way less relevant than scope (pointcut) and content (advice method implementation) of the aspects as such. For example, a simple advice like this can be potentially super expensive: before() : call(* *(..)) { doSomeExpensiveLogging(); useSomeExpensiveExternalResource(); } Why? Because it would globally apply to each method call in your whole application. This would be just as slow as if without AOP you would add those method calls to each place in your code before calling methods. In most cases it is not AspectJ as such which causes huge overhead (even though both the runtime and the weaver of course consume a few resources, which usually is no problem, but what the aspect does and how many times. Hence, the problem usually sits in front of the keyboard, even though it is of course possible that there is a memory leak or other problem in AspectJ. Bottom line: Please provide more information, especially full aspect code. aop.xml would also be nice. Regards -- Alexander Kriegisch https://scrum-master.de Rajendra Bhat schrieb am 25.09.2020 09:36 (GMT +07:00): > we observed around 10% latency overhead after adding aspectj LTW. > during the heap dump I observed lot memory consumption related to the > aspectj. > > Around 400 MB consumed by Aspecj, I have added 2 to 3 inteception. > > hereby attached heap dump details. > > please advise how to overcome on this..? We cannot use compile-time > weaving, because we adding aspect on the external jar. _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users