Eduardo Pelegri-Llopart wrote:
> I'd be interested in any performance data people may want
> to share with us.

JSP has the same performance as servlets.  Of course, servlet performance varies
widely.  FYI, servlet performance can beat mod_perl and mod_php, even though those
two are compiled directly into Apache.

Justin Wells wrote:

> My comments about overhead were "in theory" and based on the fact that
> both JSP and WebMacro rely on similar low level introspection (ie:
> beans), which is not free. Probably for the moment WebMacro is slightly
> slower since I haven't implemented any optimizations yet, beyond
> compiling the template on first access.

But most JSP engines perform the bean introspection at compile time, not runtime.
And compile time is so dominated by javac that the introspection time is
irrelevant.  A translation of
  <jsp:getProperty name='foo' property='bar'/>
is just
  out.print(foo.getBar());

So JSP is just as fast as servlets.

> Actually WebMacro does more aggressive introspection than the beans

> spec (and therefore than JSP), and is willing to take advantage of
> methods like:
>
>     request.setHeader("Content-type", "text/html")
>
> which are not easy to get at with only beans introspection. (WebMacro
> can view that as a property called "request.Header.Content-type").
>
> Like JSP WebMacro only parses/compiles the template on first access.

Of course, in Resin's JavaScript :-), that becomes:

request.header["Content-type"] = "text/html";

Scott Ferguson
Caucho Technology

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to