[richfaces-issues] [JBoss JIRA] Created: (RF-10987) Improve GraphValidator performance
Alexander Smirnov (JIRA)
jira-events at lists.jboss.org
Fri May 13 16:20:50 EDT 2011
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
Affects Versions: 4.0.0.Final
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
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: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list