wood burning stoves 2.0*
The moose likes JSP and the fly likes c:forEach  performance hit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "c:forEach  performance hit" Watch "c:forEach  performance hit" New topic
Author

c:forEach performance hit

Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Dear Ranchers,

Scenario:
I need to display a big Grid 25(rows)x45(column) cells.

Design done like this:

STEP 1. Among 45 columns 5 properties repeat 9 times.
So came up with bean of five properties.
hence each row can be represented as 9 such beans.
(let the bean name be "SampleBean")

STEP 2. Now for 25 rows I have declared 25 list type collections.
Like


STEP 3. Now in jsp I am printing each list using forEach, 25 times
like


Problem with JSP loading(A performance hit):
As the servlet transalted from jsp contains 25 do-while loops and custum tag(forEach) life cycles calls, jsp loading taking time.

So I want to know How best we can handle this type design issues ?
(I am using struts on top of jsps but using JSTL(forEach))

Thanks in advance.

[ January 22, 2008: Message edited by: Srinivasan thoyyeti ]
[ January 22, 2008: Message edited by: Bear Bibeault ]

Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Out of curiosity, why are you mixing JSTL with Struts?
Why not use the Struts iterate tags?


Are you actually seeing performance problems?
Have you narrowed it down to JSP processing (as opposed to DAO or network lag)?

25 x 45 while not small isn't exactly huge either.
[ January 22, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Ben Souther,

I have found the performance hit reason:

We are loading 25x45 text box cells into that grid.
So completly struck with it.

How to tackle this ???

Shall I have to reduce the no of text boxes loaded ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: c:forEach performance hit
 
Similar Threads
displaying contents of collection of beans using JSTL
can't get indexed form property to work.
Recursion & JSTL?
Using Two ArrayLists For One Table
Show HashMap forEach