Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-175

Change ProvidersRegistry MediaTypeMap to allow gets to be faster

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.0
    • Common
    • None

    Description

      Doug Larson did some more profiling and pointed out that on the ProvidersRegistry MediaTypeMap, using a ConcurrentHashMap over SimpleConcurrentMap actually improves performance by a few percentage points.

              private final SimpleMap<Class<?>, SoftReference<SimpleMap<MediaType, List<ObjectFactory<T>>>>> providersCache =
                                                                                                                                new SimpleConcurrentMap<Class<?>, SoftReference<SimpleMap<MediaType, List<ObjectFactory<T>>>>>(); ;
      

      While the cache keys (Class<?>) would not be WeakReferences, the values would still be SoftReferences.

      Thoughts?

      Attachments

        Activity

          People

            bluk Bryant Luk
            bluk Bryant Luk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: