struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Almeida <>
Subject Performance issue with nested iterator
Date Wed, 04 Jul 2012 18:19:59 GMT
Dear all,

I have got a performance issue on a nested iterator, running Struts

Consider the code below, (the example is a Book with chapters and
subchapters and we're displaying the book index -  bookIndex is a

This takes several seconds to load (map has size 10, each list is no
more than 15 items). I tried a lot of different approaches (mainly
regarding the database). However, what really surprised me was the
contents of the innermost <td> (6th row from the end): if I replace the
<s:a> with anything else (a xx, or just an <a>xx</a>) the page will load
much faster (ie, page load drops from 8 to 2 seconds).

Looking at, I
double checked the OGNL version loaded in maven and indeed I have 3.0.3.

Is there any obvious reason why I'm getting such a slow performance?

Thanks for the input!

Miguel Almeida

Example code:

<s:iterator value="%{#bookIndex}" status="row" var="chapterIndex">
	<s:set var="chapter" value="%{#bookIndex.key}"/>
	<s:set var="subchapters" value="%{#chapterIndex.value}"/>
	<s:url id="url" action="chapterloadPage">
		<s:param name="page">${chapter.firstPage}</s:param>
	<s:a href="%{url}">${}</s:a>	
			<s:iterator value="%{#subchapters}" status="ind" var="subchapter">		
					<s:url id="url" action="chapterloadPage">
						<s:param name="page"><s:property
							<s:a href="%{url}"><s:property

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message