Large Table Performance 2 (Ignore other post)
gzoller.greg.zoller.aviall.com May 22, 2009 11:59 PMHello,
(Sorry for the dupe post--struggled w/forum editor!)
I am trying to performance-tune a large table. For the purposes of my tuning I created a labs
page that populates 1000 rows of trivially simple canned data (no db involved, etc.). It's as basic as I could get. I'll show my code then my performance numbers. I also attempted to follow the tuning guidelines in this article
Java:
@Name("orderMgr") @Scope(ScopeType.SESSION) public class OrderMgr { @Out (required=false) private Order order; private int count = 1000; public OrderMgr() {this.order = new Order(count);} public int getCount() {return count;} public Order getOrder() {return this.order;} }
HTML:
<rich:dataTable id="table" immediate="true" cellpadding="0" cellspacing="0" border="0" var="item" value="#{sessionContext.get('order').lines}"> <rich:column> <f:facet name="header">Num</f:facet> <h:graphicImage id="lineInvalid" value="/img/invalid.gif"/> <h:outputText id="lineNum" value="#{item.number}" /> </rich:column> <!-- other columns here --> </rich:dataTable>
Ok, so in FF3 this took about 10.5s to render once primed. For a comparison I saved the exact same rendered page and loaded it into a browser statically, and this took about 2.5s to render.
8s is quite a performance tax for something not really doing any logic. If I understand the article correctly, using an outjected object should avoid the Seam interceptor penalty (or most of it).
Actually that was really strange. I read a lot of posts talking about the cost of Seam interceptors. Turns out I didn't see much of a difference, and I tried @BypassInterceptors on the class, @Out for order, and normal Seam (non-outjected) access for order. No significant performance difference. The sample here even shows I told EL what context to look in for the object...any performance gains were insignificant. Any ideas there?
I'm kinda bummed because my problem seemed so similar to the article using nearly identical technology and the author got huge performance gains and my YSlow needle didn't budge.
I'd love to hear from anyone who's made headway with this kind of problem.
Thanks!
Greg