Details
- 
        Type:
 Improvement
            
         - 
        Status: Closed
 - 
            Priority:
 Major
                
             - 
            Resolution: Invalid
 - 
            Affects Version/s: 1.8DR#1
 - 
            Fix Version/s: None
 - 
            Component/s: Framework
 - 
            Labels:None
 - 
            Environment:All (JSF 1.2?)
 
Description
                    Throughout the JSF framework, UIComponent objects delegate behaviours to their Renderer, which is accomplished in UIComponentBase by:
Renderer result = context.getRenderKit().getRenderer(getFamily(), getRendererType());
The call to FacesContext.getRenderKit() takes up the majority of acccessing the Renderer. In JSF 1.2, their FacesContextImpl class does the following for getRenderKit():
private RenderKitFactory rkFactory;
private RenderKit lastRk;
private String lastRkId;
public RenderKit getRenderKit() {
assertNotReleased();
UIViewRoot vr = getViewRoot();
if (vr == null)
return (null);
String renderKitId = vr.getRenderKitId();
if (renderKitId == null)
return null;
if (renderKitId.equals(lastRkId))
return lastRk;
else {
lastRk = rkFactory.getRenderKit(this, renderKitId);
lastRkId = renderKitId;
return lastRk;
}
}
Ours is implemented a bit differently, which brings up questions of correctness. But, regardless, the key optimisation involves caching the last RenderKit, as well as the RenderKitFactory.
            
Renderer result = context.getRenderKit().getRenderer(getFamily(), getRendererType());
The call to FacesContext.getRenderKit() takes up the majority of acccessing the Renderer. In JSF 1.2, their FacesContextImpl class does the following for getRenderKit():
private RenderKitFactory rkFactory;
private RenderKit lastRk;
private String lastRkId;
public RenderKit getRenderKit() {
assertNotReleased();
UIViewRoot vr = getViewRoot();
if (vr == null)
return (null);
String renderKitId = vr.getRenderKitId();
if (renderKitId == null)
return null;
if (renderKitId.equals(lastRkId))
return lastRk;
else {
lastRk = rkFactory.getRenderKit(this, renderKitId);
lastRkId = renderKitId;
return lastRk;
}
}
Ours is implemented a bit differently, which brings up questions of correctness. But, regardless, the key optimisation involves caching the last RenderKit, as well as the RenderKitFactory.
Issue Links
- blocks
 - 
            
        
        ICE-3082
        CPU performance/efficiency
    
-         
     - Closed
 
 -         
 
Activity
- All
 - Comments
 - History
 - Activity
 - Remote Attachments
 - Subversion