You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "zhouyanming (JIRA)" <ji...@apache.org> on 2010/07/15 09:22:50 UTC
[jira] Created: (WW-3467) Improve performance for page rendering by
refactoring freemarker cache
Improve performance for page rendering by refactoring freemarker cache
----------------------------------------------------------------------
Key: WW-3467
URL: https://issues.apache.org/jira/browse/WW-3467
Project: Struts 2
Issue Type: Improvement
Affects Versions: 2.1.8.1, 2.1.8, 2.1.6, 2.1.5
Reporter: zhouyanming
Priority: Blocker
Attachments: patch.txt
currently,struts2 have two inconsistent options about freemarker cache
1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
this option will used by freemarker.cache.MruCacheStorage
2.<constant name="struts.freemarker.templatesCache" value="true" />
this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
my patch deprecated this option and clean those code
also add a option to change default update cache interval (5 seconds)
<constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
BTW:set devMode to true will disable cache and update immediately
using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-3467) Improve performance for page rendering
by refactoring freemarker cache
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart resolved WW-3467.
-------------------------------
Assignee: Lukasz Lenart
Fix Version/s: 2.2.1
Resolution: Fixed
Patch committed, thanks!
> Improve performance for page rendering by refactoring freemarker cache
> ----------------------------------------------------------------------
>
> Key: WW-3467
> URL: https://issues.apache.org/jira/browse/WW-3467
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.5, 2.1.6, 2.1.8, 2.1.8.1
> Reporter: zhouyanming
> Assignee: Lukasz Lenart
> Priority: Blocker
> Fix For: 2.2.1
>
> Attachments: patch.txt
>
>
> currently,struts2 have two inconsistent options about freemarker cache
> 1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
> this option will used by freemarker.cache.MruCacheStorage
> 2.<constant name="struts.freemarker.templatesCache" value="true" />
> this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
> my patch deprecated this option and clean those code
> also add a option to change default update cache interval (5 seconds)
> <constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
> BTW:set devMode to true will disable cache and update immediately
> using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
> I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3467) Improve performance for page rendering
by refactoring freemarker cache
Posted by "lefebvre (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12911176#action_12911176 ]
lefebvre commented on WW-3467:
------------------------------
With this new option, is it necessary to keep thé freemarker.proprties With template_update_delay=60000
?
> Improve performance for page rendering by refactoring freemarker cache
> ----------------------------------------------------------------------
>
> Key: WW-3467
> URL: https://issues.apache.org/jira/browse/WW-3467
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.5, 2.1.6, 2.1.8, 2.1.8.1
> Reporter: zhouyanming
> Assignee: Lukasz Lenart
> Priority: Blocker
> Fix For: 2.2.1
>
> Attachments: patch.txt
>
>
> currently,struts2 have two inconsistent options about freemarker cache
> 1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
> this option will used by freemarker.cache.MruCacheStorage
> 2.<constant name="struts.freemarker.templatesCache" value="true" />
> this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
> my patch deprecated this option and clean those code
> also add a option to change default update cache interval (5 seconds)
> <constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
> BTW:set devMode to true will disable cache and update immediately
> using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
> I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-3467) Improve performance for page rendering by
refactoring freemarker cache
Posted by "zhouyanming (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhouyanming updated WW-3467:
----------------------------
Attachment: patch.txt
> Improve performance for page rendering by refactoring freemarker cache
> ----------------------------------------------------------------------
>
> Key: WW-3467
> URL: https://issues.apache.org/jira/browse/WW-3467
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.5, 2.1.6, 2.1.8, 2.1.8.1
> Reporter: zhouyanming
> Priority: Blocker
> Attachments: patch.txt
>
>
> currently,struts2 have two inconsistent options about freemarker cache
> 1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
> this option will used by freemarker.cache.MruCacheStorage
> 2.<constant name="struts.freemarker.templatesCache" value="true" />
> this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
> my patch deprecated this option and clean those code
> also add a option to change default update cache interval (5 seconds)
> <constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
> BTW:set devMode to true will disable cache and update immediately
> using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
> I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3467) Improve performance for page rendering
by refactoring freemarker cache
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889056#action_12889056 ]
Lukasz Lenart commented on WW-3467:
-----------------------------------
It can be, I was looking into FreemarkerTemplateEngine when this issue was registered and it looks like cache was enabled for FTE itself to cache loaded FTL template files.
> Improve performance for page rendering by refactoring freemarker cache
> ----------------------------------------------------------------------
>
> Key: WW-3467
> URL: https://issues.apache.org/jira/browse/WW-3467
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.5, 2.1.6, 2.1.8, 2.1.8.1
> Reporter: zhouyanming
> Priority: Blocker
> Attachments: patch.txt
>
>
> currently,struts2 have two inconsistent options about freemarker cache
> 1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
> this option will used by freemarker.cache.MruCacheStorage
> 2.<constant name="struts.freemarker.templatesCache" value="true" />
> this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
> my patch deprecated this option and clean those code
> also add a option to change default update cache interval (5 seconds)
> <constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
> BTW:set devMode to true will disable cache and update immediately
> using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
> I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3467) Improve performance for page rendering
by refactoring freemarker cache
Posted by "Philip Luppens (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889052#action_12889052 ]
Philip Luppens commented on WW-3467:
------------------------------------
Interesting - am I correct when I say this means the caching was not working correctly for the internal Freemarker configuration? That would certainly explain the massive difference in performance we noticed when rendering UI tags.
> Improve performance for page rendering by refactoring freemarker cache
> ----------------------------------------------------------------------
>
> Key: WW-3467
> URL: https://issues.apache.org/jira/browse/WW-3467
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.5, 2.1.6, 2.1.8, 2.1.8.1
> Reporter: zhouyanming
> Priority: Blocker
> Attachments: patch.txt
>
>
> currently,struts2 have two inconsistent options about freemarker cache
> 1.<constant name="struts.freemarker.mru.max.strong.size" value="250" />
> this option will used by freemarker.cache.MruCacheStorage
> 2.<constant name="struts.freemarker.templatesCache" value="true" />
> this option will use a internal ConcurrentHashMap in FreemarkerTemplateEngine but not freemarker native cache
> my patch deprecated this option and clean those code
> also add a option to change default update cache interval (5 seconds)
> <constant name="struts.freemarker.templatesCache.updateDelay" value="1800" />
> BTW:set devMode to true will disable cache and update immediately
> using cache will boost great performance, reduce 400ms to 20ms render a xhtml theme form and some textfield in my test .
> I think https://issues.apache.org/jira/browse/WW-2808 could closed by adding a wiki page about how to use freemarker cache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.