You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Geir Magnusson Jr." <gm...@xyris.com> on 2001/10/10 15:17:25 UTC

velocity-user@jakarta.apache.org

From: Bojan Smojver [mailto:bojan@binarix.com]

>
> "Geir Magnusson Jr." wrote:
>
> > The point is to use the same platform so the numbers are comparable.
>
> Where 'platform' is an OS/JDK/TC combo? My thinking was along
> the lines
> of:
>
> - there is a set of comparable JSP/VM pages (standard test)
> - everyone runs those on their 'platform' and they get x/y (ie. the
> 'ratio')

Sure.  That would be good too.  But I think it would be nice to have on the
Velocity site a set of benchmark results (plus the benchmark sources, of
course...).  So by platform, I meant a single OS/JDK/hardware setup just so
the real numbers can be compared.  The ratio is a good idea.  I guess we can
define as the benchmark the #/sec for sending a single static page or
something.

>
> > However, 'going through the tree' is
> > simply calling methods on objects that already exist.  I am
> trying to remove
> > some of the 'interpreted' stigma here - if caching is on,
> once you use a
> > Velocity template for the first time, it is kept as a
> living, breathing,
> > reusable set of objects, a 'cloud' if you will, much like
> the glop of
> > objects that constitute a JSP once it's compiled.  When you
> have tags, which
> > is the only way to make JSPs useful if you believe that
> letting designers
> > write Java code is a bad thing, then you have a 'cloud' of
> objects that
> > constitute the JSP, much like a Velocity AST.
>
> Aha, that's what you meant. My JSP's don't have any tags in there.
> Actually, I've looked into the Java code of my JSP's and it's 90%
> println's. It's model 1, basic bad habit, makes you seasick of all the
> <% %>, JSP.

I see.  I think that we should set a good example and use tags instead of
scriptlets for the test pages.  I'll be happy to help work that in.

There also is Jon's speed suite - however I would prefer we don't do a
WM/Vel comparison, but a JSP-Vel comparison.

> > If you have a page of text, Velocity will generate, for the
> most part, one
> > node which outputs to the writer in one glop. I expect JSP
> will beat us
> > here.  If all you have is static pages,  this is the wrong
> technology for
> > you anway :)
>
> Even if JSP was 5 times faster then VM, I'd still probably go with
> Velocity. It just makes much more sense and is far simpler. This is a
> huge advantage when one needs to explain a bit of programming
> logic to a
> non-programmer.

Sure - but in our ever vigilant on-going war against FUD, the speed issue is
one that comes up time and again.  So I'm interested in taking away that
arguement.

> <gnu-rant>
> If I wanted real speed I'd probably write my apps in C. That would be
> real fun! Just think of all the pointers I'd have to fight with... ;-)
> </gnu-rant>

C?  It's been a while, but I would write it in assembler.  More control.   I
would also make it a kernel module to avoid the overhead - I want to access
the DMA controller directly....

>
> I remember the articles on JSP's where there is something along these
> lines: "It it is COMPILED into a class and becomes a SERVLET ..." and
> some such. Sounds awfully scientific and fast to me!
>

High-tech, too.

> And yet, even with my own clumsy servlet, Velocity beats the
> thing. How
> good's that!

Hey, don't forget that it's "interpreted".

geir