improve static cache performance by using ConcurrentHashMap

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 5.0
    • Component/s: core-libs

        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.

              Assignee:
              Andrey Ozerov
              Reporter:
              Michael Warres (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: