On 5/28/05, Kevin Burton <[EMAIL PROTECTED]> wrote: > Remy Maucherat wrote: > > >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 think people are suprised because we don't realize that JSP is using > such a high level overhead internally. People see the semantics of c:if > and c:set and so forth and assume they're analogs for Java "if" > semantics and assume they would perform at the same level. > > Its more obvious to you guys because you're usually delving into Tomcat > at that level where I haven't done so in a long time (especially into > Jasper generated source)l. > > Kevin >
Ironically, that is the appeal and downside of JSTL. <c:if .... > looks pretty innocent, until one realizes how many lines Jasper2 generates to setup the tag. Jasper2 does a much better job than jasper1 in tomcat 4.0.x. If I remember correctly, jasper2 was first released with jasper 4.1.x. The initial version of jasper2 fixed some major performance issues like deeply nested try/catch and methods exceeding java's line limit. to be fair, the great thing about JSP tags and the tag API is it makes it easy for tags to operate with each other. it makes is pretty easy to mix and match JSTL with other tag libraries. the tag plugin API in jasper2 is a great way to take if, when, foreach and convert those to pure java. good luck peter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
