• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

c:forEach performance hit

 
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic