I did some superficial tests under JDK1.4. With invocation handling that
just delegates to the actual implementation, it seems that CG is slower than
Proxies initially. But after several thousand invocations CG gets
substantially (20+%) faster than Proxies. My theory is that CG somehow
benefits mor
Ah. I ran into a limitation. CGLIB is great for our proxies, as long as the
persistent classes are not polymorphic. But in the case of a class with
subclasses, we don't know the concrete class at proxy-creation time. And
theres no way for the proxy to be an instance of both Bar and Baz if Bar and
B
> Cglib is brilliant for simply wrapping method calls. As I understand its
> main feature is generating classes dynamically by merging two classes
that
> were not in any way related at compile time. The generated class looks
like
> a subclass of the original, so you don't need 1000 interfaces as
> i think the difference would be marginal, as dynamic proxies also use
> class generation behind the scenes...
I have a suspicion it will be slightly slower with CGLIB, actually.
---
This sf.net emial is sponsored by: Influence the future o
hi,
Ampie Barnard wrote:
The generated class looks like a subclass of the original
heh, but of course :) silly me...
I think it is a good idea Gavin. In theory, it should be faster than
proxies, but one might just want to test that theory.
i think the difference would be marginal, as dynamic
hi,
Cglib is brilliant for simply wrapping method calls. As I understand its
main feature is generating classes dynamically by merging two classes that
were not in any way related at compile time. The generated class looks like
a subclass of the original, so you don't need 1000 interfaces as with
hi,
On Tue, 22 Oct 2002 04:34:54 +1000, "Gavin King" <[EMAIL PROTECTED]>
said:
> Can we use this to do lazy initialization of objects without the need for
> proxy interfaces?
wouldn't you have to do this at class loading time then? that is: how
would you make your generated look like the original