Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1698

Performance issue with processTree method and JsfRuntimeInformation.isMyFacesInUse invocation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.4.4
    • Fix Version/s: 2.4.5, 2.5.RC1
    • Component/s: None
    • Labels:
      None

      Description

      There is an issue with this of JsfViewFactory.processTree and JsfRuntimeInformation.isMyFacesInUse() methods implementation. When mojarra used the cached value myFacesInUse in JsfRuntimeInformation is false and JsfRuntimeInformation.isMyFacesContextFactoryInUse() method is invoked on EVERY access.

      JsfViewFactory.processTree method checks myFaces even for mojarra implementation:
      // line 163 :

      if (isMojarraPresent() && !JsfRuntimeInformation.isMyFacesInUse()) {
            mojarraTreeHandler = new MojarraProcessTreeHandler().handleBefore(context, component);
      }
      

      unfortunatelly processTree method is called recursively for children componets - when used with composites I have over 1600 invocations of
      isMyFacesContextFactoryInUse() on my small-medium test page.

        Attachments

        1. screenshot-1.png
          screenshot-1.png
          13 kB
        2. screenshot-2.png
          screenshot-2.png
          126 kB
        3. webflow_profiler_2.4.4.png
          webflow_profiler_2.4.4.png
          109 kB

          Issue Links

            Activity

              People

              Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              martin654 Martin Sv
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: