You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Florent Ramière (JIRA)" <ji...@apache.org> on 2007/09/10 23:16:34 UTC
[jira] Created: (WW-2169) form validate="true" is very slow
form validate="true" is very slow
---------------------------------
Key: WW-2169
URL: https://issues.apache.org/struts/browse/WW-2169
Project: Struts 2
Issue Type: Improvement
Components: Views
Affects Versions: 2.0.9
Reporter: Florent Ramière
1- create page
2- create form
3- add many fields
4- rendering time for this page = R1
1- create page
2- create form with validate="true"
3- add many fields with corresponding validation defined in xml
4- rendering time for this page = R2
R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "Florent Ramière (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Ramière updated WW-2169:
--------------------------------
Attachment: form-close.ftl
in src/main/webapp/template/xhtml/form-close-validate.ftl tag.getValidators("${tagName}") takes forever and kills the performance
Looks like there should be some caching here :)
Anyway, here is a patch that will cache the in output of the form-close-validate.ftl in the application context, as this output should not change over time.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.11
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Florent Ramière (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42173 ]
Florent Ramière commented on WW-2169:
-------------------------------------
As a side note we found duplicates in the entry returned from getValidators
We added in the form-close-validate.js the following code
<#assign prevTagName = '' />
<#list parameters.tagNames as tagName>
<#if (prevTagName != tagName)>
<#assign prevTagName = tagName />
<#list tag.getValidators("${tagName}") as validator>
...
...
</#if>
</#list>
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.11
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2169:
--------------------------
Fix Version/s: (was: 2.1.x)
2.1.3
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.3
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Toshi Mikuni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42546 ]
Toshi Mikuni commented on WW-2169:
----------------------------------
this patch seems degrade on i18n application.
consider requested "locale" for "currentFormValidatorKey"
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.1
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44414#action_44414 ]
Musachy Barroso commented on WW-2169:
-------------------------------------
Just to confirm what Don said, AnnotationActionValidatorManager:getValidators caches the validators. Make sure that you dont have 'devMode' or 'struts.configuration.xml.reload' set to true.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.3
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-2169) form validate="true" is very
slow
Posted by "Toshi Mikuni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42546 ]
mikuni edited comment on WW-2169 at 11/3/07 11:21 PM:
------------------------------------------------------------
this patch seems degrade on i18n application.
consider requested "locale" for "currentFormValidatorKey"
like
<#assign currentFormValidatorKey = (parameters.namespace?replace('/','') + parameters.id + locale.language) />
was (Author: mikuni):
this patch seems degrade on i18n application.
consider requested "locale" for "currentFormValidatorKey"
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.1
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso updated WW-2169:
--------------------------------
Affects Version/s: (was: 2.0.9)
Future
Not sure what to do with this, moving to "Future" pending confirmation or a way to replicate this.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: Future
> Reporter: Florent Ramière
> Fix For: 2.1.3
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2169) form validate="true" is very slow
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-2169.
---------------------------------
Resolution: Cannot Reproduce
feel free to re-open with more details on how to reproduce this problem.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.1.0
> Reporter: Florent Ramière
> Fix For: Future
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42994#action_42994 ]
Ted Husted commented on WW-2169:
--------------------------------
Is the cached instance of prevTagName utilized somewhere in the <#list parameters block?
Otherwise, I don't see ho
If someone is using an approach that is kinder to i18n, then please try and provide a complete and clear patch, or patching instructions.
Also, while the comment cites the "form-close-validate.js" file, I take this to mean <struts2/core/src/main/resources/template/xhtml/form-close.ftl>
Please also be very specific as to whether the suggested change is being used successfully by your own application (e.g., "works for me!").
-Ted.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.1
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43110#action_43110 ]
Don Brown commented on WW-2169:
-------------------------------
The core issue seems to be the caching of validators for a given action class. Looking at the code, the validator list is cached unless reloading configs is turned on. Are you sure you aren't running in debug mode?
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.x
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2169:
-----------------------------
Flags: [Patch, Important] (was: [Important, Patch])
Fix Version/s: (was: 2.0.11)
2.0.12
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.12
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2169:
-----------------------------
Fix Version/s: 2.0.11
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.11
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2169:
--------------------------
Fix Version/s: (was: 2.1.1)
2.1.x
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.x
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-2169) form validate="true" is very
slow
Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42994#action_42994 ]
husted edited comment on WW-2169 at 1/15/08 4:19 AM:
---------------------------------------------------------
Is the cached instance of prevTagName utilized somewhere in the <#list parameters block? Otherwise, I don't see how this would work.
If someone is using an approach that is kinder to i18n, then please try and provide a complete and clear patch, or patching instructions.
Also, while the comment cites the "form-close-validate.js" file, I take this to mean <struts2/core/src/main/resources/template/xhtml/form-close.ftl>
Please also be very specific as to whether the suggested change is being used successfully by your own application (e.g., "works for me!").
-Ted.
was (Author: husted):
Is the cached instance of prevTagName utilized somewhere in the <#list parameters block?
Otherwise, I don't see ho
If someone is using an approach that is kinder to i18n, then please try and provide a complete and clear patch, or patching instructions.
Also, while the comment cites the "form-close-validate.js" file, I take this to mean <struts2/core/src/main/resources/template/xhtml/form-close.ftl>
Please also be very specific as to whether the suggested change is being used successfully by your own application (e.g., "works for me!").
-Ted.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.1.1
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2169) form validate="true" is very slow
Posted by "Florent Ramière (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42174 ]
Florent Ramière commented on WW-2169:
-------------------------------------
James, the attached patch is most probably not something you want to embed in struts2.
I think that the proper solution should reside either in xwork or ActionSupport.
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.11
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-2169:
-----------------------------
Flags: [Patch, Important] (was: [Important])
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.9
> Reporter: Florent Ramière
> Fix For: 2.0.11
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2169) form validate="true" is very slow
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso updated WW-2169:
--------------------------------
Affects Version/s: (was: Future)
2.1.0
Fix Version/s: (was: 2.1.3)
Future
> form validate="true" is very slow
> ---------------------------------
>
> Key: WW-2169
> URL: https://issues.apache.org/struts/browse/WW-2169
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Affects Versions: 2.1.0
> Reporter: Florent Ramière
> Fix For: Future
>
> Attachments: form-close.ftl
>
>
> 1- create page
> 2- create form
> 3- add many fields
> 4- rendering time for this page = R1
> 1- create page
> 2- create form with validate="true"
> 3- add many fields with corresponding validation defined in xml
> 4- rendering time for this page = R2
> R2 >> R1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.