You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Felipe Rodrigues (JIRA)" <ji...@apache.org> on 2007/07/30 14:23:06 UTC
[jira] Created: (WW-2077) Change parseWidgets to false in djConfig
inside head FTL .Should be false for better performance!
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
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.
[jira] Resolved: (WW-2077) Change parseWidgets to false in djConfig
inside head FTL .Should be false for better performance!
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-2077.
---------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.0.11)
2.1.0
Thanks for the suggestion!
> 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
> Assignee: Musachy Barroso
> Fix For: 2.1.0
>
>
> 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.
[jira] Updated: (WW-2077) Change parseWidgets to false in djConfig
inside head FTL .Should be false for better performance!
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (WW-2077) Change parseWidgets to false in djConfig
inside head FTL .Should be false for better performance!
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso reassigned WW-2077:
-----------------------------------
Assignee: Musachy Barroso
> 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
> Assignee: Musachy Barroso
> 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.