From http://www.theserverside.com/news/thread.tss?thread_id=25538: > I ran into scalability problems with Object streams when writing a custom > transport for JBoss. It boils down to some static variables being > synchronized within java.io.ObjectStreamClass > > /** cache mapping local classes -> descriptors */ > private static final SoftCache localDescs = new SoftCache(10); > /** cache mapping field group/local desc pairs -> field reflectors */ > private static final SoftCache reflectors = new SoftCache(10); > > I walked through some hoops to change the use of SoftCache to a > ConcurrentReaderHashMap and throughput started increasing 20-40% depending on > how many threads you run through Now that ConcurrentHashMap is part of the JDK, this change can be considered for serialization.
|