[Meinds-developers] Aspects: pro's and con's
Brought to you by:
emcs,
rickardoberg
|
From: Rickard <ri...@xp...> - 2001-11-30 09:25:56
|
Hey Having tinkered a bit more with the aspect stuff, I have found a couple of problems with the approach. First of all, the most obvious problem: it is not possible for an AOP-object to implement interfaces with methods that clash. I.e. you can't have interfaces A and B that both have "String getName()" methods in them. If they have different method signatures it's ok. This may not be a big problem in reality, but it's something to watch for. Second, the performance impact. The current code uses reflection and dynamic proxies, so there's an 0.03ms/call overhead. This may become a problem with huge amounts of objects. That said, I think I have found a way to get around the performance problem. Instead of using dynamic proxies one can use the TechTrader Bytecode Toolkit (http://sourceforge.net/projects/tt-bytecode/) to generate these proxies. Then it is possible to entirely avoid reflection, which should improve performance to the point where it's almost no overhead at all. Any other thoughts from people on the list about this? You're a very quiet crowd... /Rickard -- Rickard Öberg |