[richfaces-issues] [JBoss JIRA] Resolved: (RF-10987) Improve GraphValidator performance

Alexander Smirnov (JIRA) jira-events at lists.jboss.org
Fri Jul 22 18:13:23 EDT 2011


     [ https://issues.jboss.org/browse/RF-10987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Smirnov resolved RF-10987.
------------------------------------

    Resolution: Done


> 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: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list