You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/08/06 23:25:53 UTC

FW: Velocity and JSP speed testing...

Not exactly scientific, but I do trust Rickard to do things correctly...he
has an existing JSP page for testing and then converted it to
Velocity...here are the results...

    JSP - 240-480ms
    Velocity - 50-70ms

You make the decision.

:-)

-jon

------ Forwarded Message
From: Rickard Öberg <ri...@xpedio.com>
Reply-To: velocity-user@jakarta.apache.org
Date: Mon, 06 Aug 2001 17:41:37 +0200
To: velocity-user@jakarta.apache.org
Cc: Webwork-User <we...@lists.sourceforge.net>
Subject: Re: Velocity monthlist

Rickard Öberg wrote:
> Ok guys, this is latest(-ish) Catalina sources. I tried hitting the page
> a couple of hundred times before checking the time, and it stabilized at
> scores around 50-70ms. So, that's like, 6 times faster than the same JSP
> running on Tomcat 3.2. And the VM was direct converted, almost line by
> line, since the WebWork taglib is very similar to the Velocity
> directives, so it's a quite fair comparison.

And to make this comparison even more fair, I just tested the JSP page
on the same Catalina build, and it scored between 240-480ms. So, not
only is it slower, it is more fluctuating (and I also think I dare say
that the JSP taglib in WebWork is as optimized as it can be).

Interesting...

/Rickard

-- 
Rickard Öberg
Software Development Specialist
xlurc - Xpedio Linköping Ubiquitous Research Center
Author of "Mastering RMI"
Email: rickard@xpedio.com

------ End of Forwarded Message


Re: FW: Velocity and JSP speed testing...

Posted by Bojan Smojver <bo...@binarix.com>.
When I switched my projects from JSP to Velocity, I did it more for:

- simplicity of the language (VTL)
- taking away (from web designers) the power to write/execute Java
directly

but if it's fast as well, even better :-)

Bojan

PS. It does take longer to get the first page. Velocity has to start and
all...

Jon Stevens wrote:
> 
> Not exactly scientific, but I do trust Rickard to do things correctly...he
> has an existing JSP page for testing and then converted it to
> Velocity...here are the results...
> 
>     JSP - 240-480ms
>     Velocity - 50-70ms
> 
> You make the decision.
> 
> :-)
> 
> -jon
> 
> ------ Forwarded Message
> From: Rickard Öberg <ri...@xpedio.com>
> Reply-To: velocity-user@jakarta.apache.org
> Date: Mon, 06 Aug 2001 17:41:37 +0200
> To: velocity-user@jakarta.apache.org
> Cc: Webwork-User <we...@lists.sourceforge.net>
> Subject: Re: Velocity monthlist
> 
> Rickard Öberg wrote:
> > Ok guys, this is latest(-ish) Catalina sources. I tried hitting the page
> > a couple of hundred times before checking the time, and it stabilized at
> > scores around 50-70ms. So, that's like, 6 times faster than the same JSP
> > running on Tomcat 3.2. And the VM was direct converted, almost line by
> > line, since the WebWork taglib is very similar to the Velocity
> > directives, so it's a quite fair comparison.
> 
> And to make this comparison even more fair, I just tested the JSP page
> on the same Catalina build, and it scored between 240-480ms. So, not
> only is it slower, it is more fluctuating (and I also think I dare say
> that the JSP taglib in WebWork is as optimized as it can be).
> 
> Interesting...
> 
> /Rickard
> 
> --
> Rickard Öberg
> Software Development Specialist
> xlurc - Xpedio Linköping Ubiquitous Research Center
> Author of "Mastering RMI"
> Email: rickard@xpedio.com
> 
> ------ End of Forwarded Message

Re: Velocity and JSP speed testing...

Posted by Jon Stevens <jo...@latchkey.com>.
on 8/6/01 7:18 PM, "Craig R. McClanahan" <cr...@apache.org> wrote:

> 
> 
> On Mon, 6 Aug 2001, Jon Stevens wrote:
> 
>> Not exactly scientific, but I do trust Rickard to do things correctly...he
>> has an existing JSP page for testing and then converted it to
>> Velocity...here are the results...
>> 
>>     JSP - 240-480ms
>>     Velocity - 50-70ms
>> 
> 
> Frankly, I'm astounded it took you so long to figure out that you had a
> legitimate case on performance ... at least versus Jasper :-).

It wasn't my posting. I was forwarding another posting. So, the "you" should
be directed at the original poster.

That said, the previous results that I had achieved were a quite bit closer
than those though. The above is pretty astounding.

> Try this
> on some other containers and you will find different results.  Orion,
> Resin, and WebLogic are supposed to have pretty fast implementations.

Rickard did. Velocity was either on par or faster. Read the Velocity-dev
archives.

> I did ... the code that Jasper generates is not optimized at all, so doing
> a decent optimizing compiler will make a pretty dramatic
> difference.  Watch this space. :-)

Ok.

> Craig (who is actually quite happy with Catalina at this point :-)

I'm pretty happy with the container. Jasper still sucks...regardless of it
being a JSP implementation. :-)

p.s. Even though Tomcat is supposed to be more concerned with the R.I.
status, people are using it for more than that and are depending on it. *I
think* it is ludicrous to assume otherwise as well as to force people to
purchase commercial implementations in order to get a decently performing
engine.

-jon


Re: Velocity and JSP speed testing...

Posted by Remy Maucherat <re...@apache.org>.
> Craig R. McClanahan at craigmcc@apache.org wrote:
> >
> >> -jon
> >
> > Craig (who is actually quite happy with Catalina at this point :-)
>
> Never been a fan of JSPs myself, but seeing Velocity (lately I had to
> install it for EyeBrowse on Nagoya, and it was painful) I'm not a big fan
of
> that thing either.
>
> But anyway, coming out of the blue on that, I'm pretty damn tired of this
> whole argument about Velocity VS. JSPs thing...
>
> Tomcat IS the R.I. for Servlets AND JSPs, that's what we agreed on with
Sun
> from the very first time, that's what I keep believing into. So, please,
> both of you (yeah, I'm going to say "shut up" to my project lead) SHUT UP.

Behave ;-)

> I don't give a damn on which one is faster/better. We're here to talk
about
> the development of one product. If you were new users being moderated I
> would reject your postings as "OFF-TOPIC".

I don't really agree in general, although here Jon's post is not very
useful, since there are no details at all on the benchmark.

At least, we can use that as a motivation to improve Jasper so we don't look
as bad ;-)

Remy


RE: Velocity and JSP speed testing...

Posted by Paulo Gaspar <pa...@krankikom.de>.
> He is over on the Velocity lists being a pain in the ass still. :-)
>
> I just love him.

I love you too Jon.


> Our last flame war was about me wanting to get rid of the dynamic
> logging in
> Velocity and just make a dependency on Log4J. Eventually, I think he just
> gave up. Now that Ceki has the 25k .jar file, it is no contest.

Yes, after a few servings of Jon's usual "delicate" approach, Jason van
Zyl made a single post where he made sense of it all.

Sometimes Jon is right - he just has some trouble explaining it.
(He tends to explode something in the process.)
=;o)


Have fun,
Paulo


> -----Original Message-----
> From: Jon Stevens [mailto:jon@latchkey.com]
> Sent: Tuesday, August 07, 2001 6:31 AM
>
>
> on 8/6/01 9:24 PM, "Christopher Cain" <cc...@mhsoftware.com> wrote:
>
> > Totally OT, bandwidth-wasting, irrelevant musings P.S. ...
> >
> > Where did that Paulo Gaspar cat go? That guy was always
> interesting in a flame
> > war, especially with Jon involved. Man ... dude did NOT like
> Jon, but he sure
> > loved Velocity. I wonder he went ... I really miss those days,
> back when we
> > were all so young and innocent ... it was a simpler time ;-)
> >
> > Anyway, Jon, I always thought that you should have used some of
> those flame
> > posts from Gaspar for some really sweet Velocity advocacy,
> maybe in your mag
> > articles and web site and stuff. I can hardly think of a more compelling
> > advertisement for Velocity than one of those, "Jon is in
> insufferable ass, but
> > I wouldn't use any other solution than Velocity." That speaks volumes.
> >
> > I really do miss that Gaspar guy though ... we liked him :-)
> >
> > - Christopher
>
> He is over on the Velocity lists being a pain in the ass still. :-)
>
> I just love him.
>
> Our last flame war was about me wanting to get rid of the dynamic
> logging in
> Velocity and just make a dependency on Log4J. Eventually, I think he just
> gave up. Now that Ceki has the 25k .jar file, it is no contest.
>
> :-)
>
> p.s. Below is a recent privately sent email that I got about the
> JDJ article
> I wrote...name/company removed to protect this fine enlightened
> individual.
> :-)
>
> -jon
>


Re: Velocity and JSP speed testing...

Posted by Jon Stevens <jo...@latchkey.com>.
on 8/6/01 9:24 PM, "Christopher Cain" <cc...@mhsoftware.com> wrote:

> Totally OT, bandwidth-wasting, irrelevant musings P.S. ...
> 
> Where did that Paulo Gaspar cat go? That guy was always interesting in a flame
> war, especially with Jon involved. Man ... dude did NOT like Jon, but he sure
> loved Velocity. I wonder he went ... I really miss those days, back when we
> were all so young and innocent ... it was a simpler time ;-)
> 
> Anyway, Jon, I always thought that you should have used some of those flame
> posts from Gaspar for some really sweet Velocity advocacy, maybe in your mag
> articles and web site and stuff. I can hardly think of a more compelling
> advertisement for Velocity than one of those, "Jon is in insufferable ass, but
> I wouldn't use any other solution than Velocity." That speaks volumes.
> 
> I really do miss that Gaspar guy though ... we liked him :-)
> 
> - Christopher

He is over on the Velocity lists being a pain in the ass still. :-)

I just love him.

Our last flame war was about me wanting to get rid of the dynamic logging in
Velocity and just make a dependency on Log4J. Eventually, I think he just
gave up. Now that Ceki has the 25k .jar file, it is no contest.

:-)

p.s. Below is a recent privately sent email that I got about the JDJ article
I wrote...name/company removed to protect this fine enlightened individual.
:-)

-jon

> Dear Jon,
> 
> I have just finished reading your article evaluating JSP in the July issue
> of Java Developers Journal.  Thank you for your very thoughtful analysis of
> JSP and the use of alternatives.  My company does not use Velocity, but we
> could have written this article years ago.  Our team consists of four
> people who are all Java programmers.  Three years ago when everybody else
> was just doing out.print lines from servlets, we saw the need for a
> template based approached to embedding reusable code elements in HTML
> pages.  So we wrote a template parsing engine that takes in an HTML page,
> parses out tags that look like {%PAGE_VAL namedThis%} and outputs a
> page.  The servlet code handles everything a web application ever needs
> such as database connections, SQL, math, array handling, user objects,
> caching, etc. and the templates themselves act in a consequence free
> environment where all errors are caught and simply explained back to the
> designer or user.  When a client's project demands custom code, we simple
> extend the basic tag parsing engine and code the processing of the custom
> tag elements.
> 
> We built this architecture for convenience and because there was nothing
> like available at at the time.  But throughout the emergence of JSP 1.1, we
> have looked to migrate away from our home grown solution to move to a more
> industry standard solution for our clients.  The problem is the closer we
> get to developing in JSP, the more we started to really hate it. We hate it
> for all of the reasons you describe in your article.  I think one of your
> best points is how JSP is really only a solution for Java
> programmers.  That being said, we are a team of all Java programmers, and
> we are still running screaming away from it.  As much as we enjoy writing
> code, we don't want a line of it inside our HTML pages.
> 
> Thank you very much for thinking outside the JSP box, and helping us
> justify the techniques we believe are best for ourselves and our clients.


RE: Velocity and JSP speed testing...

Posted by Christopher Cain <cc...@mhsoftware.com>.
Quoting Paulo Gaspar <pa...@krankikom.de>:

> Sorry man, I can't make a really good flame war when I agree 
> with Jon.

That's okay, buddy. You're back, and that's the important thing. We missed you 
is all ;-)

- Christopher

RE: Velocity and JSP speed testing...

Posted by Paulo Gaspar <pa...@krankikom.de>.
Sorry man, I can't make a really good flame war when I agree 
with Jon.

But there is still hope: we still flame each other from time 
to time (even if on other lists). Nothing as blazing than that
one you remember, but still...
=:o)


Have fun,
Paulo

> -----Original Message-----
> From: Christopher Cain [mailto:ccain@mhsoftware.com]
> Sent: Tuesday, August 07, 2001 6:24 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: Velocity and JSP speed testing...
> 
> 
> Totally OT, bandwidth-wasting, irrelevant musings P.S. ...
> 
> Where did that Paulo Gaspar cat go? That guy was always 
> interesting in a flame 
> war, especially with Jon involved. Man ... dude did NOT like Jon, 
> but he sure 
> loved Velocity. I wonder he went ... I really miss those days, 
> back when we 
> were all so young and innocent ... it was a simpler time ;-)
> 
> Anyway, Jon, I always thought that you should have used some of 
> those flame 
> posts from Gaspar for some really sweet Velocity advocacy, maybe 
> in your mag 
> articles and web site and stuff. I can hardly think of a more compelling 
> advertisement for Velocity than one of those, "Jon is in 
> insufferable ass, but 
> I wouldn't use any other solution than Velocity." That speaks volumes.
> 
> I really do miss that Gaspar guy though ... we liked him :-)
> 
> - Christopher
> 

Re: Velocity and JSP speed testing...

Posted by Christopher Cain <cc...@mhsoftware.com>.
Totally OT, bandwidth-wasting, irrelevant musings P.S. ...

Where did that Paulo Gaspar cat go? That guy was always interesting in a flame 
war, especially with Jon involved. Man ... dude did NOT like Jon, but he sure 
loved Velocity. I wonder he went ... I really miss those days, back when we 
were all so young and innocent ... it was a simpler time ;-)

Anyway, Jon, I always thought that you should have used some of those flame 
posts from Gaspar for some really sweet Velocity advocacy, maybe in your mag 
articles and web site and stuff. I can hardly think of a more compelling 
advertisement for Velocity than one of those, "Jon is in insufferable ass, but 
I wouldn't use any other solution than Velocity." That speaks volumes.

I really do miss that Gaspar guy though ... we liked him :-)

- Christopher

Re: Velocity and JSP speed testing...

Posted by Christopher Cain <cc...@mhsoftware.com>.
Quoting "Pier P. Fumagalli" <pi...@betaversion.org>:
> 
> But anyway, coming out of the blue on that, I'm pretty damn tired of
> this whole argument about Velocity VS. JSPs thing...
> 
> Tomcat IS the R.I. for Servlets AND JSPs, that's what we agreed on with
> Sun from the very first time, that's what I keep believing into. So,
> please, both of you (yeah, I'm going to say "shut up" to my project lead) SHUT
> UP.

Sure ... what he said! =)

Actually, I don't really have an opinion on the whole JSP vs. Velocity thing,
and for me, personally, all of the asundry posts that make up the Presentation-
Layer Wars don't really thrill me _OR_ offend me. From the posts I've seen over 
the past year or so, it wasn't really much of a war anyway. If it _was_ a war, 
then as an unbiased observer I'd have to say that JSP pretty much got bombed 
back to the stone age ... oops ... did I say that out loud ;-)

Anyway, I just thought I'd take this opportunity to mention that anyone who is 
now sitting and staring at their keyboard with nothing to type, given Pier's 
official moritorium on the Presentation Wars, you could always kill some time 
by kicking around any one of my last several e-mails and giving me any 
thoughts/feedback/insight on _anything_ I am trying to accomplish.

*tapping at the monitor* ... is this thing on? :-)

- Christopher

Re: Velocity and JSP speed testing...

Posted by Jon Stevens <jo...@latchkey.com>.
on 8/6/01 7:45 PM, "Pier P. Fumagalli" <pi...@betaversion.org> wrote:

> Never been a fan of JSPs myself, but seeing Velocity (lately I had to
> install it for EyeBrowse on Nagoya, and it was painful) I'm not a big fan of
> that thing either.

Installation != Use

Remember the old JServ 1.0 days when it *sucked* to install it, but it was
still pretty damn good software that *you* were proud of?

:-)

> Especially you, Jon. Damn it, we've walked this path together for a very
> long time. And _as_a_friend_ I'm begging you, if you want to keep going on
> with your crusade against JSPs do it, but be wise enough to do it in the
> right places...

Sorry Pier. I think that performance testing and results of Tomcat 4.0 is
perfectly legal here. Especially in the context of competition with JSP.
Lets not fool our users into thinking that the ASF is producing the fastest
JSP implementation. Oh wait. That's obvious. :-)

The fact that I throw in quips about how JSP sucks balls is my own gibberish
that you are just going to have to put up with. Sorry. :-)

-jon


Re: Velocity and JSP speed testing...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
> 
>> -jon
> 
> Craig (who is actually quite happy with Catalina at this point :-)

Never been a fan of JSPs myself, but seeing Velocity (lately I had to
install it for EyeBrowse on Nagoya, and it was painful) I'm not a big fan of
that thing either.

But anyway, coming out of the blue on that, I'm pretty damn tired of this
whole argument about Velocity VS. JSPs thing...

Tomcat IS the R.I. for Servlets AND JSPs, that's what we agreed on with Sun
from the very first time, that's what I keep believing into. So, please,
both of you (yeah, I'm going to say "shut up" to my project lead) SHUT UP.

I don't give a damn on which one is faster/better. We're here to talk about
the development of one product. If you were new users being moderated I
would reject your postings as "OFF-TOPIC".

Especially you, Jon. Damn it, we've walked this path together for a very
long time. And _as_a_friend_ I'm begging you, if you want to keep going on
with your crusade against JSPs do it, but be wise enough to do it in the
right places...

Thanks...

    Pier


Re: FW: Velocity and JSP speed testing...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 6 Aug 2001, Jon Stevens wrote:

> Not exactly scientific, but I do trust Rickard to do things correctly...he
> has an existing JSP page for testing and then converted it to
> Velocity...here are the results...
> 
>     JSP - 240-480ms
>     Velocity - 50-70ms
> 

Frankly, I'm astounded it took you so long to figure out that you had a
legitimate case on performance ... at least versus Jasper :-).  Try this
on some other containers and you will find different results.  Orion,
Resin, and WebLogic are supposed to have pretty fast implementations.

> You make the decision.
> 
> :-)
> 

I did ... the code that Jasper generates is not optimized at all, so doing
a decent optimizing compiler will make a pretty dramatic
difference.  Watch this space. :-)

> -jon

Craig (who is actually quite happy with Catalina at this point :-)