|
From: Rob H. <ro...@ca...> - 2004-12-19 23:47:22
|
Oliver, I think you are right on this point - Janino should in theory be much faster since we can produce specific code for each advice type as required, and we can do so easily. Coupled with some clever caching we can do a lot with the Janino approach, make it very performant, and we have full control over it. I am hoping to add this support in time for 1.2 but I will be fixing current bugs with the CGLIB implementation provided I can get the appropriate patches added to CGLIB as required. Rob Oliver Hutchison wrote: >Using Janino is a great idea. > >A few months back I was playing around with implementing "abstract >schema" for the Spring AOP subsystem and I did some simple benchmarking >of Janino, CGLIB and JDK proxies and found that Janino was surprisingly >efficient given the extra processing it needs to do. > >I generated the proxies using raw java code rather with than a template >system as I didn't want to have any additional dependencies but what >would be really nice is if you could generate the AST directly and I >believe this may be on the way. > >Janino also includes line number (but not local variable) info in the >generated classes. So if you save the code to disk you can step through >the proxy implementation! > >Oliver > > > > >>-----Original Message----- >>From: spr...@li... >>[mailto:spr...@li...] >> On Behalf Of Rob Harrop >>Sent: Friday, 17 December 2004 11:43 PM >>To: spr...@li... >>Subject: [Springframework-developer] Extending Spring AOP >> >> >>All, >> >>I am planning to add to an additional proxy implementation to >>Spring to >>solve some of the problems we are experiencing with other >>approaches and >>to allow for additional optimizations and advice types to be added in >>the most efficient way. >> >>Currently, I'm looking at two separate approaches - Java-based using >>Janino and Bytecode-based using SERP. The Java-based approach >>should be >>quite simple to create and could be coupled with Velocity to >>externalize >>much of the boilerplate code needed for the creation of proxy >>classes. >>Alternatively we could add a simple abstraction layer on top >>of Janino, >>a la .NET CodeDOM (good idea James). The bytecode approach is >>much more >>complex and will be harder to debug but it would probably allow for >>absolute raw performance. >> >>I am comfortable with either approach although I think that >>Janino would >>be ideal for our purposes. >> >>Your thoughts? >> >>Rob >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from >>real users. Discover which products truly live up to the >>hype. Start reading now. >>http://productguide.itmanagersjournal.com/ >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://productguide.itmanagersjournal.com/ >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > |