UtilTimerStack activation (XWork)
---------------------------------
Key: WW-3202
URL: https://issues.apache.org/struts/browse/WW-3202
Project: Struts 2
Issue Type: Sub-task
Reporter: Musachy Barroso
Assignee: Musachy Barroso
Priority: Minor
Fix For: Future
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.