Scott Troxell created WW-3949:
---------------------------------

             Summary: FreeMarker Template in struts2.3.7 is significantly 
slower than 2.3.4.1 and earlier
                 Key: WW-3949
                 URL: https://issues.apache.org/jira/browse/WW-3949
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.3.7
         Environment: JDK 1.6, tomcat 6.0.24, struts 2.3.7
            Reporter: Scott Troxell


A page using numerous <s:... tags using freemarker, take considerably longer in 
struts 2.3.7.
A page with at least 50 <s:textfield.../> takes over 14 seconds to long in 
struts 2.3.7 where in struts 2.3.4.1 and earlier it takes 2-4 seconds.

The following settings are in my struts.properties file:
struts.freemarker.templatesCache=true
struts.freemarker.templatesCache.updateDelay=600000
struts.freemarker.mru.max.strong.size=0

I turned on logging and believe the issue is partly in the retrieval of the 
cached copy.

In struts 2.3.4.1 - the logging between the last lookup of the previous field 
and the retrieval of the text.ftl cache is 16ms
[2012-12-17/11:59:23.309/EST] DEBUG [freemarker.beans] line 81: Key 
"labelposition" was not found on instance of java.util.LinkedHashMap. ...
[2012-12-17/11:59:23.325/EST] DEBUG [freemarker.cache] line 81: 
"/resources/template/custom-css/text.ftl"["false",ISO-8859-1,parsed]  cached 
copy not yet stale; using cached.

In struts 2.3.7 - the logging between the last lookup of the previous field and 
the retrieval of the text.ftl cache is 187ms
[2012-12-17/12:01:56.312/EST] DEBUG [freemarker.beans] line 81: Key 
"labelposition" was not found on instance of java.util.LinkedHashMap. ...
[2012-12-17/12:01:56.499/EST] DEBUG [freemarker.cache] line 81: 
"/resources/template/custom-css/text.ftl"["false",ISO-8859-1,parsed]  cached 
copy not yet stale; using cached.

So the difference between these to environments is over 10 times to do the same 
thing.  This difference is consistent throughout the log file.

I played with different settings in the properties file without any success and 
the log is telling me that the cache is being used.

I can provide complete log files if required.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to