[Opensource] JSP performance
Peter A. J. Pilgrim
peterp at xenonsoft.demon.co.uk
Fri Jul 26 19:24:05 PDT 2002
Vincent Gogan wrote:
> I have a performance question. I am using Expresso 4.02 with Sun's JDK 1.3.1_03
> (deadline is a little tight to use 4.1) and am using Peter Pilgrim's JSP tags.
> On one page I have quite a few tags and hitting the page triggers the garbage
> collector almost every time. This wouldn't be so bad except that the garbage
> collection takes 8/9 seconds. This is on a completely unloaded server (dual
> PIII 1.4GHz, 1Gig memory). This isn't very nice behaviour.
>
> I suspect part of the problem is that Tomcat instantiates a new object for
> every tag reference
> but I wouldn't think this would cause such horrible performance. I have many
> other JSP
> pages which make use of the same tags and they don't have the same problem.
> Does anyone
> have any ideas of how to tune things up?
>
(1) How big is your page?
What is the post compiled JSP size. Look in the $TOMCAT_HOME/work
directory?
It may be relevant because I once wrote a simple enough <contextPath> custom
tag for a web app. I was surprised by a JSP page over 150K or so, because
I had replace every where <%= request.getContextPath() %> with my
contextPath tag. So I backtracked.
There are too many custom tag invocations. Try to use expressions
for the simpler stuff.
(2) Is your page generated from a database? Are you getting a large
result set from the database?
Try to reduce the table size, by using pagination, or use limitation syntax
feature of Expresso (Mysql)
(3) What particular tags are you using ? It may be something in my
custom tag implementation.
(4) Try upgrading to the latest jakarta tomcat 4 catalina release
Some of the recent release had been very bugged, reportedly, because of the
Jasper did not release memory resource when it need to spawn the
javac compiler.
(5) Do you have a comercial optimizer available? I don't have anything at home.
All the above is guess work with a proper profiling.
> Thanks,
>
> Vincent
> vincent at cherniaksoftware.com
>
--
Peter Pilgrim +-----\ +-++----++----+
Java Technologist | | | || || | 'n' Shine
| O | | || --+| ---+
/\ | ._ / | | \ \ | |
/ \ | | \ \ | |+-- || ---+ A new day
/_ _\ "Up" | | | | | || || | is coming
|| +-+ +-+ +-++----++----+
<home page="http://www.xenonsoft.demon.co.uk/" />
More information about the Opensource
mailing list