Some profiling of Tomcat reveals that it currently creates quite a few duplicate String values. Most of these appear to be from objects created when parsing the `mbeans-descriptors.xml` files. For example, `java.lang.String` is a very common `type` attribute. By using a Map technique as describe in https://shipilev.net/jvm/anatomy-quarks/10-string-intern/ we could reduce memory consumption.
Pull request available at https://github.com/apache/tomcat/pull/143
Fixed in: - trunk for 9.0.17 onwards - 8.5.x for 8.5.39 onwards - 7.0.x for 7.0.94 onwards