You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Lindholm <gr...@gmail.com> on 2010/03/29 21:24:18 UTC
S2 in interator really slow
Struts 2.1.8
I had one page in the application I'm working on which was really
really slow... it was taking 4-5 seconds to render the jsp page.
It's a very simple page, just a list of 10 to 15 items that are
iterated over and each one gets a form with one hidden field and a
button.
It appears it's the <s:form> tag that is is culprit.
Here is the original:
<s:iterator value="#action.userConnectionsPaged">
<s:if test="typeNoConnection">
<div class="section">
<s:form action="AddConnection" theme="simple">
<s:hidden name="userId" value="%{userId}" theme="simple"/>
<s:submit cssClass="button" key="FindConnections.action.addConnection"
theme="simple"/>
</s:form>
</div>
</s:if>
</s:iterator>
Here what I replaced it with to make it run fast:
<s:iterator value="#action.userConnectionsPaged">
<s:if test="typeNoConnection">
<div class="section">
<form action='<s:url action="AddConnection" />' >
<input type="hidden" name="userId" value='${userId}' />
<input type="submit" name="FindConnections.action.addConnection"
value='<s:text name="FindConnections.action.addConnection"/>'
class="button"/>
</form>
</div>
</s:if>
</s:iterator>
That was the only change I made to the page and now there is no
noticeable delay in rendering the page.
Anyone have any idea what would cause the <s:form> tag to take so
long? Is there a bug or something with it?
Is there any additional information I can provide to help someone
figure out what is going on?
I've seen reports on this mailing list of slow rendering of jsp pages
but never encountered myself before.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2 in interator really slow
Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/29 Greg Lindholm <gr...@gmail.com>:
> <s:iterator value="#action.userConnectionsPaged">
What is this? Did you try with static list (not from DB or so)?
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org