XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1.8
    • None
    • None

    Description

      On every UtilTimerStack push/pop, UtilTimerStack checks if it is active or not. isActive checks if a system property which is implemented with a HashTable. Some traces:

      Method Traces Count Total Latency(ms)
      java.util.Hashtable.get(Object) 33 1,151.000
      java.util.Properties.getProperty(String) 33 1,151.000
      java.lang.System.getProperty(String) 33 1,151.000
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.isActive() 32 1,115.000
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.push(String) 23 807.000
      org.apache.struts2.dispatcher.Dispatcher.serviceAction(HttpServletRequest, HttpServletResponse, ServletContext, ActionMapping) 14 518.000
      com.opensymphony.xwork2.DefaultActionInvocation.invoke() 7 215.000
      com.opensymphony.xwork2.DefaultActionInvocation.executeResult() 1 50.000
      com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(Object, ActionConfig) 1 23.000
      com.opensymphony.xwork2.util.profiling.UtilTimerStack.pop(String) 9 307.000
      sun.security.action.GetPropertyAction.run() 1 36.000
      sun.security.action.GetPropertyAction.run() 1 36.000

      I think checking for the system property should be done only once, on a static init. The profiler util can be activated at runtime using it's API or a parameter.

      Attachments

        Activity

          People

            musachy Musachy Barroso
            musachy Musachy Barroso
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: