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
Mark Collette
created issue -
Mark Collette
made changes -
Ken Fyten
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Invalid [ 6 ] |
Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup.
Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf
If the issue persists with the current ICEfaces release, please create a new JIRA for it.