_typeToClassMap in Java Instance
Java's Instance maintains a type id to class name map: https://github.com/zeroc-ice/ice/blob/3.7/java/src/Ice/src/main/java/com/zeroc/IceInternal/Instance.java#L1908
This class name is then resolved to an actual class type using the current classloader each time we lookup this type id: https://github.com/zeroc-ice/ice/blob/3.7/java/src/Ice/src/main/java/com/zeroc/IceInternal/Instance.java#L758
We could instead keep a map with key = class loader + type id value = class object (Class<?>) to speed-up this resolution.
Note: InputStream's EncapsDecoder also maintains its own cache typeId to class.
One potential issue with the per-communicator caching of classes is for application servers that might load/unload apps. How do we ensure that the classes for unloaded apps are cleared from this map? Or do we cache only for the "fixed" class loaders? (no caching for the per-thread context class loader)
Are we sure that the class lookup by the class loader performs badly? It might be worth testing this before adding another level of caching.
3.8 introduced a new SliceLoader interface, and a DefaultSliceLoader that improve class loading and allow to customize the loading of clases.