Ole check this out
marc
|-----Original Message-----
|From: Rickard Öberg [mailto:[EMAIL PROTECTED]]
|Sent: Wednesday, August 16, 2000 12:04 AM
|To: jBoss User; jBoss Developer
|Subject: [jBoss-Dev] Performance fix
|
|
|All,
|
|Some important performance problems were found and eliminated yesterday.
|
|jboss-user version:
|Fix is in CVS. After a clean rebuild, jboss-client.jar is updated so you
|need to redistribute it to your clients.
|
|jboss-dev version:
|This wasn't "deep" as I first thought. It was "deep, move to a parallel
|dimension, back again, through a black hole, and then some". The basic
|problem was that if a method returned an EJBObject proxy (such as home
|methods, or some bean methods) the call would take about 80ms. Crap
|performance in laymans terms. After A LOT of digging, testing, and JDK
|source reading, I found out that it was the *deep breath* container stub
|class descriptor RMI codebase annotation during serialization of dynamic
|proxies that through the internal RMI classloader involved extraction of
|multiple URL's from the MLet classloader, and in the process required
|FilePermission checks on all JAR's in classpath. *breeaatthhee oouutt*..
|(Note: what finally led to me this conclusion was that I did new
|Exception().printStacktrace() from within the SecurityManagers
|checkPermission method. Most illuminating)
|
|Did you get that? :-)
|
|Basically, A WHOLE LOT OF THINGS GOING ON FOR EACH CALL!
|
|So, by placing the stub classes (which are in jboss-client.jar) in the
|Class-Path: manifest header of run.jar, they were instead available from
|the system loader, hence bypassing the lengthy process of MLet URL
|extraction and verification, and instead uses the RMI codebase system
|property.
|
|Result? Well, instead of 80ms for a call to a method involving returning
|of proxies, it takes about 4 ms. :-)
|
|During my travels through the jBoss code I also updated the classes that
|were sent frequently between client and server (mainly the proxy
|InvocationHandlers and RemoteMethodInvocation classes) to implement
|Externalizable instead of Serializable. My research for the Mastering
|RMI book has shown that this optimization can provide quite large
|performance improvements for this type of objects.
|
|Happy happy.
|
|Well, that's it. As above, the fixes are in CVS now. Go get 'em.
|
|regards,
| Rickard
|
|--
|Rickard Öberg
|
|Email: [EMAIL PROTECTED]
|http://www.telkel.com
|http://www.jboss.org
|http://www.dreambean.com
|
|