-
Enhancement
-
Resolution: Fixed
-
P4
-
5.0
-
beta
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2132132 | 5.0u7 | Andrey Ozerov | P4 | Resolved | Fixed | b01 |
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.
> 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.
- backported by
-
JDK-2132132 improve static cache performance by using ConcurrentHashMap
-
- Resolved
-