-
Enhancement
-
Resolution: Done
-
Trivial
-
3.1.4.Final
-
None
MediaTypeHelper creates new instance of MediaTypeComparator for every invocation of method using it. The comparator is collected by minor GC but is very noticeable in `jmap -histo`:
num #instances #bytes class name ---------------------------------------------- 1: 9792214 1319679080 [C 2: 3527801 548777072 [B 3: 4015784 283789264 [Ljava.lang.Object; 4: 1535314 236687048 [I 5: 6324191 151780584 java.lang.String 6: 4591782 146937024 java.util.HashMap$Node 7: 7942616 127081856 org.jboss.resteasy.util.MediaTypeHelper$MediaTypeComparator