From: <mt...@op...> - 2004-11-18 22:45:42
|
First of all, I wanted to say how impressed I am with the DynamicProxy code - great job! Having said that, I couldn't help but notice that even the non-reflection (delegate) based proxy adds a lot of overhead to each method invocation, and that some of this is overhead is inherent in the design (for example, the requirement that value types be boxed/unboxed on each call). For applications that require every bit of performance they can get, it should be possible to avoid this overhead if you are only worried about proxying interfaces (and if you are willing to do a bit of extra work). In this case, you can replace InterfaceProxyGenerator with a version that does not inherit from BaseCodeGenerator, and that does not use the Interceptor/Invocation machinery. This involves making direct use of the CodeBuilder classes. I was wondering if anybody else has tried this, and if so, what their experience has been. Is this something that DynamicProxy team is willing to support? |