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?