I wonder why dynamic proxy const is not cached, for instance in
BaseLocalProxyFctory.

switching :

InvocationHandler ih = new InvocationHandlerImpl();
Proxy.newProxyInstance(classloader, new Class[]{itf.class}, ih);

to the code :

InvocationHandler ih = new InvocationHandlerImpl();
cstr.newInstance(new Object[]{ih});

with the following code executed before :
Class clazz = Proxy.getProxyClass(Thread.currentThread().getContextClassLoader(), new 
Class[]{itf.class});
Constructor cstr = clazz.getConstructor(new Class[]{InvocationHandler.class});

is very much faster, with jdk1.4.1_01 and a loop of 1000000
I got 21.11 seconds versus 0.38 seconds.

In fact, getProxyClass() is very slow.

I know were going to use new AOP framework and that might be different, but current 
3.xx production
release still use DP.

julien

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to