org.ejbca.util.dn.DNFieldsUtil created to solve
ECA-1841 generates a lot of new org.ejbca.util.dn.DNFields and org.ejbca.util.dn.DNFields.Field instances.
Running memory profiling on org.ejbca.* and org.cesecore.* with EJBCA 4.0.2alpha while running "ant test:runlotsperuser" gives the following:
1. DNFields.Field is responsible for 16.1% of all object instantiations and 10.2% of all allocated memory. (Live instances 0-5%, using 0-3% of memory)
6. DNFields is responsible for 5.4% of all object instantiations and 2.2% of all allocated memory. (Live instances 0-2%, using 0-1% of memory)
So these objects are short lived, but perhaps there is a way to perform this String manipulation that is more efficient and generates less work for the garbage collector?