correction to my previous email.

On 5/28/05, Remy Maucherat <[EMAIL PROTECTED]> wrote:
> On 5/28/05, Peter Lin <[EMAIL PROTECTED]> wrote:
> > as you see already, using JSTL means a single line of code gets
> > converted to several lines of JSTL api calls. once you look at how
> > many classes are involved in executing JSTL, it's pretty clear it's
> > using much more memory and causing more GC. The performance you see is
> > the result of JSTL using more memory.
> 
> It will obviously use more CPU and make more API calls. However, it
> does not allocate any objects, but instead will reuse per page objects
> (which is very fast). So overall, it sounds weird to me that the
> bottleneck would be on tag invocation.
> 
> In the end, it's hard to beat a Java "if" with a generic high level
> construct ;) I don't understand how anyone could be surprised by that.
> 

I should note that the difference was greater in Jasper 1. The latest
jasper has improved over the original jasper, which is what I used to
compare JSTL vs Java. Remy's response reminded me of the differences,
so my statement may not be true for the latest jasper and would only
apply to the original jasper2. That version didn't have the tag plugin
or all the recent stuff in tomcat 5.5.x.

> > Back in 2002, I wrote several pages using JSP + java and JSP + JSTL to
> > measure the actual cost of from a performance perspective. The
> > performance difference isn't noticeable if a page has less than 50
> > tags. With 200+ tags, the performance difference does range from 2-5x
> > slower for JSTL. It's worse when you use XML with JSTL. It's also one
> > of the reasons I like to use JSTL + XML to benchmark. It really gives
> > the VM a workout.
> >
> > have you tried running JRockit 5?  I did some tests recently and
> > JRockit's memory management might give you a 2x improvement in
> > performance. That's assuming you can use jdk5
> 
> Right, the code for invoking tags seems to be a good candidate to be
> optimized by a competent JIT.
> 

Don't know if anyone cares, but Resin's fastJSTL basically compiles to
java. Or atleast it used to when JSTL 1.0 was originally released.
Maybe it's just me, but I've come to expect tags to run slower and
make a butt load of more API calls.  One tip that might help is to
increase the heap in tomcat. Before our application went into
production, I ran 12 different heap configurations and ran a suite of
JMeter stress tests to see which is optimal. good luck.

peter lin

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

Reply via email to