Description
Thinking about some stuff for JSF 2.3 and checking how ResourceHandler is implemented, I notice the call to ResourceHandler.libraryExists(...) does not take advantage of ResourceLoaderCache and instead call every ResourceLoader and ContractResourceLoader. The problem is these loaders has some calls that are slow, while a cache lookup can be fast.
Most of the time. ResourceHandler.libraryExists(...) is called when a facelet is compiled and it requires a composite components. Since there is already a cache for compiled facelets, the impact is seen only when the facelet is compiled, but this step is done for every facelet that makes a reference to the same composite component.
It is a minor improvement, but it will improve the speed of the compilation step.