[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Post-compile Weaving Vs Load-time Weaving

The BEA article provides the motivation for weaving in the VM, and compared to weaving at load-time done "above" the VM where some of the data structures have to be duplicated, it can be more efficient. However, if you use post-compile time (or even compile time) weaving, that's more efficient at runtime than even VM-based weaving. The reason is simply that you pay the cost once at build time, the classes that you load and run incur no overhead. (It's important to distinguish between the cost of doing weaving, and the cost of executing the woven code). If you're worried about performance then run a quick benchmark - you'll soon see that the code generated by AspectJ is very efficient. 

Regards, Adrian.

On 8 Nov 2006, at 11:55, virendersingh@xxxxxxxxxx wrote:

Hi Adrian,

This is in context to the article on the bea site (http://dev2dev.bea.com/pub/a/2005/08/jvm_aop_1.html). They have talked of the problems with Bytecode Instrumentation-based Weaving, namely double bookkeeping: building a class database for the weaver, instrumentation is inefficient. I am not clear after reading the article whether these issues would be there with post-compile weaving as well. (I have posted the question on their site as well.)

Virender Singh,

HSBC Software Development (India) Pvt Ltd
HSBC Center Riverside,West Avenue ,
25 B Kalyani Nagar Pune  411 006 INDIA

Telephone: +91 20 26683000
Fax: +91 20 26681030

This e-mail is confidential. It may also be legally privileged.
If you are not the addressee you may not copy, forward, disclose
or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the
sender immediately by return e-mail.

Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability
for any errors or omissions.

aspectj-users mailing list