In doing some profiling of our applications that embed Felix, I'm seeing heaps of blocking on ClassLoader.loadClass(). Obviously, a lot of this is necessary, but I wonder if we couldn't do a better job of not calling it when it is not? Could we cache misses in a copy-on-write map, avoiding any synchronization? Since most of this is happening on a module level, it should know if dynamic imports are supported and if so, disable the miss cache, but for the majority of the cases, you should be able to cache. Even for the dynamic imports, you could cache misses, then flush when new bundles are resolved.
Has anyone else profiled Felix? Are there any OSGi benchmark apps available? Don
