I'm not sure anyone has pointed this out yet, but maybe the performance 
problem would go away if you shortened your jsp code (300 lines).  I'm 
curious why it's that long?  Maybe you could refactor the code into custom 
tags or setup more of your data in a struts action class for the jsp to 
view.  Even if performance didn't increase you'd end up with an easier to 
maintain jsp.

Dave


>From: [EMAIL PROTECTED]
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: Improving performance by splitting JSP?
>Date: Mon, 9 Sep 2002 15:56:45 -0500
>
>
>We were using the 1.3 vm - I'm not sure if it was the 02 or 03 release.  03
>I'm pretty sure.
>
>We did not rerun any of the tests when 1.4 came out - as far as that
>customer's application goes they can't run 1.4 (hpux machines - they have
>to wait quite awhile for vm releases).  And we all moved on to other
>projects / deliverables so didn't rerun our isolated tests against 1.4 vm.
>I still have the sample application we created to try to isolate the
>problem, but I couldn't find any of the spreadsheets we put our results in.
>Might be able to find one from a coworker.
>
>The speed of the sun vm when profiling was turned on was still slower than
>IBM vm with lots of tags, but not orders of magnitude difference.
>
>We found orders of magnitude difference in performance between one page
>with tons of tags against both:
>
>- a small page with a high-count loop around a few tags
>- a series of pages put together via includes
>
>Jim
>
>
>
>
>                       "Joe Barefoot"
>                       <Joe.Barefoot@mot        To:       "Struts Users 
>Mailing List" <[EMAIL PROTECTED]>
>                       iva.com>                 cc:
>                                                Subject:  RE: Improving 
>performance by splitting JSP?
>                       09/09/2002 12:41
>                       PM
>                       Please respond to
>                       "Struts Users
>                       Mailing List"
>
>
>
>
>
>
>Thanks for the information, that's great to know.  Which VM version were
>you testing with?  Out of curiosity, did you ever run performance tests
>using the Sun 1.4 VM to see if there was an improvement?
>
>I find it especially interesting that turning on profiling flags in the Sun
>VM increased performance--was the speed then comparable to IBM's VM?  Any
>speculation as to the cause of this?
>
>
>thanks,
>Joe Barefoot
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 09, 2002 9:35 AM
> > To: Struts Users Mailing List
> > Subject: RE: Improving performance by splitting JSP?
> >
> >
> >
> >
> > We also ran into problems with single JSPs containing lots of bm
> > (bean:message) and bw (bean:write) tags.  We wrote our own
> > custom tag that
> > did not involve Struts, and found similar behavior using the
> > Sun vm under
> > both Tomcat and Weblogic on NT boxes (lousy performace with a
> > bunch of them
> > in one page - much better with same number of tags split up
> > over several
> > pages).  When we swapped out to the IBM vm, the discrepancy
> > in performance
> > went away - both styles reasonably fast.  To get significant numbers
> > (orders of magnitude difference in performance) we went to
> > thousands of
> > tags, by the way.
> >
> > We took lots of statistics and made a lot of posts on
> > newsgroups, and never
> > really got any good explanation from anyone.  Interestingly,
> > when we turned
> > profiling flags on in the sun vm to try to track what was
> > going on, the
> > symptoms went away.
> >
> > We experimented with try/catch blocks (manually editing
> > generated servlet
> > code to drastically reduce them), since there were some known
> > performance
> > bugs at the time against the sun vm regarding tc blocks.  This had no
> > effect, and we didn't really expect any, since the bugs had to do with
> > nested tcs rather than lots in serial.
> >
> > In the end our solution was just to be careful about the size
> > of the JSPs,
> > since our client could not go to the IBM vm.
> >
> > Jim
> >
> >
> >
> >
> >
> >                       "Joe Barefoot"
> >
> >
> >                       <jbarefoot@sbcglo        To:
> > "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >
> >                       bal.net>                 cc:
> >
> >
> >                                                Subject:  RE:
> > Improving performance by splitting JSP?
>
> >                       09/08/2002 07:21
> >
> >
> >                       PM
> >
> >
> >                       Please respond to
> >
> >
> >                       "Struts Users
> >
> >
> >                       Mailing List"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Wow. I dunno, but here's a guess (you could look at the code
> > generated to
> > get a better idea if this is a contributing factor):
> >
> > Since each JSP compiles down to a single method call in the generated
> > source
> > class, and (depending on how the JSP compiler generates Java
> > source) each
> > custom tag could potentially have its own try/catch block as well as
> > several
> > local variables, the more 'stuff' you have on a single page
> > correlates to
> > the amount of stack memory required for the local scope of
> > the method call.
> >
> > I imagine that the overhead for the much larger (single page)
> > method call
> > would hinder perfomance *somewhat*, but if splitting it up
> > increases speed
> > that much, there must be something else awry here.
> >
> > peace,
> > Joe
> >
> >
> > -----Original Message-----
> > From: gus [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, September 07, 2002 7:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: Improving performance by splitting JSP?
> >
> >
> > Hi!
> >
> > I had a performance problem in my struts application where one JSP
> > page took about 5 secs to display (Tomcat 4.0.4, Struts 1.1b1, Win2k,
> > PIII 500, 512Mb). The page uses struts taglibs (bean, logic, html) and
> > is nearly 300 lines long.
> >
> > I tried to track down the problem but with no luck. Finally I split
> > the page into 3 parts using <jsp:include ...> and now the whole page
> > loads 5 times faster.
> >
> > Does anybody made the same experience and/or has an explanation for
> > that behaviour?
> >
> > Regards
> >     gus
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
>
>--
>To unsubscribe, e-mail:   <
>mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <
>mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to