After hacking a bit, I've managed to put together a version of
ObjectInputStream, ObjectStreamClass, etc... that uses a
ConcurrentReaderHashMap instead of a synchronized Map within
ObjectStreamClass.lookup.
Wow!, a simple synchronized of a global map killed performance. The
Under that kind of contention its certainly possible. Use the thread
analyzer to see if the waiting corresponds to the time spent in the
suspected hotspot.
Scott Stark
Chief Technology Officer
JBoss Group, LLC
Bill Burke wrote:
I've been
I've been optimizing marshalling by extending ObjectInputStream and
OutputStream, and overriding readClassDescriptor and
writeClassDescriptor, only marshalling the classname rather than the
whole shabang. I even keep a local cache of ObjectStreamClasses for
readClassDescriptor to lookup at