[ 
https://issues.apache.org/struts/browse/WW-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Holmes updated WW-2077:
-----------------------------

    Fix Version/s: 2.0.11

Sounds like a nice little performance improvement to me that would be easy to 
implement. I haven't worked with this tag or the other DOJO-related tags so I 
will defer the work to someone else.

> Change parseWidgets to false in djConfig inside head FTL .Should be false for 
> better performance! 
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-2077
>                 URL: https://issues.apache.org/struts/browse/WW-2077
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Component Management
>    Affects Versions: 2.0.10
>         Environment: All
>            Reporter: Felipe Rodrigues
>             Fix For: 2.0.11
>
>
> I'm thinking about open an issue to make put parseWidgets: false on djConfig 
> initial load. This would improve the performance so much.
> The fact is that dojo walk through each DOM node in a document looking for 
> widgets to parse, so it makes the footprint very slow.
> The solution is to tell to dojo what are our widget, based on widget id. A 
> simple solution would be put a line in each ftl template to render some dojo 
> widget. Something like that in FTL:
> <div dojoType="struts:BindDiv"
>   <#if parameters.delay?exists>
>     delay="${parameters.delay?c}"<#rt/>
>   </#if>
>   <#if parameters.updateFreq?exists>
>     updateFreq="${parameters.updateFreq?c}"<#rt/>
>   </#if>
>   <#if parameters.autoStart?exists>
>     autoStart="${parameters.autoStart?string?html}"<#rt/>
>   </#if>
>   <#if parameters.startTimerListenTopics?if_exists != "">
>     startTimerListenTopics="${parameters.startTimerListenTopics?html}"<#rt/>
>   </#if>
>   <#if parameters.stopTimerListenTopics?if_exists != "">
>     stopTimerListenTopics="${parameters.stopTimerListenTopics?html}"<#rt/>
>   </#if>
>   <#if parameters.refreshOnShow?exists>
>     refreshOnShow="${parameters.refreshOnShow?string?html}"<#rt/>
>   </#if>
>   <#if parameters.separateScripts?exists>
>     scriptSeparation="${parameters.separateScripts?string?html}"<#rt/>
>   </#if>
>   <#include "/${parameters.templateDir}/ajax/ajax-common.ftl" />
>   <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
> >
> <script>djConfig.searchIds.push("${parameters.id}");</script>
> From what I've seen this would be a little change that would make us improve 
> the performance of Struts2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to