]
Alexander Smirnov updated RF-10987:
-----------------------------------
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Forum Reference:
Improve GraphValidator performance
----------------------------------
Key: RF-10987
URL:
https://issues.jboss.org/browse/RF-10987
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-validators, optimization
Affects Versions: 4.0.0.Final
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
Priority: Critical
Labels: tran
Fix For: 4.1.0.Milestone1
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
ClonedObjectResolver became performance bootleneck.
We have a very simple page that displays a rich:datatable. We noticed that on the backend
ClonedObjectResolver.resolveCloned gets called a lot and is very slow. Looking at the
method (code below) I think the issue is that it scans the request map every time and
looks for a graph prefix validator. If we comment this code out the performance improves
50%. The main question is what is it trying to do and is this only needed in some specific
situations like a particular component on the page?
{code}
public static Object resolveCloned(ELContext context, Object base, Object property){
if(null != base || null != property){
FacesContext facesContext = FacesContext.getCurrentInstance();
Map<String, Object> requestMap =
facesContext.getExternalContext().getRequestMap();
for (String key : requestMap.keySet()) {
if(null != key &&
key.startsWith(UIGraphValidator.STATE_ATTRIBUTE_PREFIX)){
UIGraphValidator.GraphValidatorState state = (GraphValidatorState)
requestMap.get(key);
if(state.isSame(base, property)){
return state.getCloned();
}
}
}
}
return null;
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: