You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pete Hall <pe...@thecitysecret.com> on 2008/01/23 09:49:38 UTC
[Struts2] anchor tag performance with ajax
I'm using the <s:a> tag and I'm experience a severe performance penalty.
This is with Struts 2.0.11
As part of my JSP page I have
<s:iterator value="pageData">
<tr id="row_<s:property value="id"/>">
<td>
<s:url id="removeUrl" action="investDelete">
<s:param name="jabreId" value="jabreId" />
</s:url>
<s:a href="%{removeUrl}" theme="ajax"
targets="investData"><img src=images/delete.gif border=0 alt='remove'></s:a>
</td>
<td>
<s:url id="editUrl" action="investEdit">
<s:param name="jabreId" value="jabreId"
/>
</s:url>
<s:a href="%{editUrl}" theme="ajax"
targets="investData"><img src=images/edit.gif border=0 alt='edit'></s:a>
</td>
There are 5 other plain text columns in the table. There are around 350
rows in the table. The JSP is loaded into a <s:div> that is a tab of a
<s:tabbedPanel>
The full set of tabs takes around 1 minute 10 seconds to fully load (i.e.
the browser stops processing the page).
If I remove the two <s:a> tags in the fragment above, then the page takes 35
seconds to load. These timings are from Firefox 2.0.11, but IE7 has a
similar problem (IE7 gives a message about 'the script on this page is
taking a long time')
Dojo seems to process result of the <s:a> tags, during which time the
browser takes 50% of the CPU and is unresponsive.
Is there any way I can manually generate the final result of the output of
the <s:a> tag to avoid this. If I can't, then I will need to remove all the
struts ajax tags and do everything 'by hand'
Thanks for your time.
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org