[ http://jira.codehaus.org/browse/DISPL-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119265 ]
Wolfgang Schmiesing commented on DISPL-380: ------------------------------------------- I agree with Tomasz and am facing a similar performance issue. I have a <display:table> tag that includes 9 <display:column> tags. One column tag includes a simple iteration over up to 5 values, two others a simple if-then-else construct. The rest is plain display of values. When I leave out the columns with iteration and cond. logic display is 4 times faster. The difference to the Tomasz' scenario is that my column logic does depend on the current row. However, it does not need to be executed each time when the list is re-displayed but only once. I also think that this is true for most use-cases when the whole list is kept in memory. Thus, it would be nice to be able to evaluate the column logic once instead of every time the list is re-displayed. > Very poor performance on bigger list or bigger <display:table> tag content > -------------------------------------------------------------------------- > > Key: DISPL-380 > URL: http://jira.codehaus.org/browse/DISPL-380 > Project: DisplayTag > Issue Type: Bug > Components: Tag Library > Affects Versions: 1.1 > Reporter: Tomasz Bech > Priority: Critical > > When the list to display is average (in my case ~2000) and there is big > content of <display:table> preformance is very poor: ~40 second to display 20 > results out of 2000. > I dig out and now see the way to improve it. > Scenario > <display:table contains some logic + display:columnt tags: > <display:table id="oc" name="results" pagesize="${pagesize}" > requestURI="${request.contextPath}" sort="list" > defaultsort="1"> > <!-- some logic here about 20 logic tags - very needed --> > <logic:iterate id="attr" name="x" property="b"> > ..... > <display:column > property="a" > .... > /> > </display:table> > Obviously the display:table iterates its content through whole list - so all > the tags are evaluated list.size() times. And it is very time consuming. > doAfterBody called on TableTag in loop takes 38 seconds and real display of > table (doEndTag) 2s in my case. > In fact it is enough to iterate the body of display:table ONCE, build the > column structure and do the job in doEndTag. It will improve performance > dramatically in such cases. > The only difference is that there cannot be any code inside which depends on > the current row (for example getting the value from row and using it in > anyway. > To keep compatibility, new flag can be added: evaluateBodyOnce [boolean] (or > buildColumnStructureOnce) to switch from every-row-body-evaluation to > one-time-body-evaluation. > (Now to improve performance a little bit, partialList can be used, but there > is a lot of code to write addtionaly - to sort, to tract offset, etc). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel