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

Usage of ReflectionUtils.findMethod and ClassUtils.getMethodIfAvailable in SelectionTrackingActionListener and FlowFacesContext is a critical performance issue

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.4.0.RC1
    • Component/s: JSF
    • Labels:
      None

      Description

      We have a webapp with SWF 2.3.0 (it seems to be the same with SWF 2.3.2) and JSF 2.1 and have done performance tests in an environment with WebSphere and IBM JRE. When we reached a number of concurrent users of around 80 we get hot spots in calls of Class.getMethods and Class.getDeclaredMethods. The stack trace contains following SWF methods which perform these calls often:

      • SelectionTrackingActionListener.trackSelection
      • FlowFacesContext.getELContext
        Inspecting the source of these methods I detected that they call ReflectionUtils.findMethod and ClassUtils.getMethodIfAvailable every time they are called - without caching the method handles reached in previous calls.
        After doing a quick fix for this by caching the method handles we have solved these hot spots. I have attached my quick fixed to this issue.

      Could you please fix this for the next SWF release?

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            malzahn Volker Malzahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: