On Mon, Aug 27, 2001 at 01:47:54PM -0400, Geir Magnusson Jr. wrote:
> 
> > Tomcat 3.2.3.  From what I understand, the tablib parsing routines in Tomcat
> > 3.2.X are really quite slow.  The two simple pages I tested are simple:
> > Create an array of strings 10 long, iterate though the array printing out
> > each element and printing the current date.
> 
> Did you set up the JSP via servlet front controller?

Nope, I used some JSP scriptlets (ack!) to initialize the array on the
simple JSP test page, so it was completely self-contained.  Of course I used
the #set directive in Velocity to init an array for the JSP+Veltag case.

> > For the simple page I was testing with (my home page
> > http://www.greenhydrant.com/~drees/, mostly static pages with a header,
> > footer included), I found that JSP or JSP/Velocity is a LOT slower than
> > mapping *.vm to a controller servlet (MVC type app).
> 
> LOL.  Ok - I wasn't thinking about Velocity vs JSP, but JSP vs JSP+Veltag.
> The latter I would think are comparable.  I believe that it has been shown
> that Velocity is faster than Tomcat 3.x JSPs.

My original post was JSP vs JSP+Veltag, but since I already had the
Servlet+Velocity combo running I compared it to that, too.  If you have to
use JSP for some strange reason, using the Veltag is a good way to go, but
in real life the benefits of writing a simple controller to handle *.vm
performs way better on Tomcat and is a much cleaner design anyway.

> We are going to add a parameter for that,
> 
> runtime.slow.this.thing.down = n
> 
> where n is the delay in milliseconds...

Sweet, will you make sure that it burns CPU time as well in lieu of just a
plain sleep?  Maybe a nice little loop doing needless calculations or
something, like a few cycles of searching for extraterrestials or Mersenne
Primes or something.  ;-)

-Dave

Reply via email to