All, I've been doing some memory profiling on my webapp to see where I can reduce our memory footprint a bit by combining equivalent objects. YourKit has some nice utilities to look for duplicate objects -- especially Strings.
I can see that the string "java.lang.String" has lots of duplicates. Many of the ones I've inspected so far can be traced-back to catalina.mbeans.MBeanUtils and the registry of MBeans that it contains. Would anyone object to using String-interning to share copies of class names for MBeans? I could even restrict such interning to Strings that start with "java.lang" since those are probably the most-used ones, and those strings are probably already interned by all the RTTI infrastructure in the JVM anyway. -chris
signature.asc
Description: OpenPGP digital signature