Details

      Description

      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?

      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;
          }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                alexsmirnov Alexander Smirnov
                Reporter:
                alexsmirnov Alexander Smirnov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: