You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jens Viebig <js...@gmx.de> on 2002/10/02 18:02:47 UTC

Faster View Components...

Struts+JSP+Struts Taglibs are sometimes so terrible slow, i think even perl
would be faster...The Action Classes are as fast as i like it but jsp-Stuff
is terrible
I have some complex pages with big tables (logic:iterate) and a lot of
<bean:write> and <html:link> tags.
Sometimes it takes longer than 10 seconds until the page starts loading
Should i kick out the taglibs and do some scriptlet stuff ?
Are there some faster alternatives to jsp to build the view ?

Greets
Jens Viebig



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Faster View Components...

Posted by Eddie Bush <ek...@swbell.net>.
Have you tried using the JSTL?  That's one optimization you could try ...

http://jakarta.apache.org/taglibs/

Look for ... JSTL :-)  You can replace many of the Struts tags with the 
JSTL - and the JSTL can be recognized by the container and optimized. 
 There's also a new contrib taglib by David M. Karr that (I think) 
should soon be available in nightly builds (you can get it out of CVS 
now).  This taglib adds the power of the JSTL EL to the Struts tags 
(they still won't be optimized like the JSTL would though).

Jens Viebig wrote:

>Struts+JSP+Struts Taglibs are sometimes so terrible slow, i think even perl
>would be faster...The Action Classes are as fast as i like it but jsp-Stuff
>is terrible
>I have some complex pages with big tables (logic:iterate) and a lot of
><bean:write> and <html:link> tags.
>Sometimes it takes longer than 10 seconds until the page starts loading
>Should i kick out the taglibs and do some scriptlet stuff ?
>Are there some faster alternatives to jsp to build the view ?
>
>Greets
>Jens Viebig
>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Faster View Components...

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

On Wed, 2 Oct 2002, Jens Viebig wrote:

> Date: Wed, 2 Oct 2002 18:02:47 +0200
> From: Jens Viebig <js...@gmx.de>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>
> To: struts-dev@jakarta.apache.org
> Subject: Faster View Components...
>
> Struts+JSP+Struts Taglibs are sometimes so terrible slow, i think even perl
> would be faster...The Action Classes are as fast as i like it but jsp-Stuff
> is terrible
> I have some complex pages with big tables (logic:iterate) and a lot of
> <bean:write> and <html:link> tags.
> Sometimes it takes longer than 10 seconds until the page starts loading
> Should i kick out the taglibs and do some scriptlet stuff ?
> Are there some faster alternatives to jsp to build the view ?
>

This is probably more a user-list question, but ...

Two things to be sure you are aware of:

* JSP pages (whether you use custom tags or not) are converted
  into servlets and then compiled the first time you use them.
  Be sure you are requesting the same page more than once to see
  what response time your user will normally encounter.  (If you
  still see 10 seconds per page there, it is *much* more likely
  to be caused by your database lookups than anything in the
  view tier).

* The performance of JSP pages with lots of custom tags is *very*
  dependent upon the quality of the code generated by the JSP page
  compiler for your server.  You don't say which one you are using,
  but if it's Tomcat, check out the difference between running on
  Tomcat 4.0.x and 4.1.x (which uses a completely rewritten page
  compiler).  Differences in the 600%-800% range (yes, that's six
  to eight times faster) have been noticed in some cases, as a result
  of the focus on optimization that the new compiler does.

For alternatives, you can use any view tier technology that can be
accessed via RequestDispatcher.forward() -- for example, some folks use
Velocity.  But you'll obviously lose the functionality performed by the
JSP custom tags if you go this way.

> Greets
> Jens Viebig

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>