Details
Description
Consider custom renderer with @ResourceDependencies (and many @ResourceDependency here). If a view has 500 UIComponent with this custom renderer, ApplicationImpl._handleAnnotations process the same set of ResourceDependecies again and again.
With my test scenario, VDL.buildView takes therefore 750ms. After small modification in ApplicationImpl _handleAnnotations it takes only 70 ms.
The modification can be like:
Class<?> inspectedClass = inspected.getClass();
// Process annotation only if this is the first creation of component(renderer,validator, converter) of particular type in this request/response
if (! context.getAttributes().containsKey(inspectedClass.getName()))
;
But I'm not sure what specification says about this processing.