tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kin-Man Chung <Kin-Man.Ch...@Eng.Sun.COM>
Subject Re: [PATCH] possible speed enhancement to
Date Fri, 19 Apr 2002 23:58:54 GMT
Thank you for the patch!  It looks interesting!  I'll definitely look
at it carefully and apply it to jasper or jasper2 when I have time,
most probably sometime next week.

> Date: Fri, 19 Apr 2002 17:09:49 -0400
> From: Duncan McLean <>
> Subject: [PATCH] possible speed enhancement to
> To: Tomcat Developers List <>
> MIME-version: 1.0
> Content-transfer-encoding: 7bit
> X-Accept-Language: en,pdf
> Delivered-to: mailing list
> Mailing-List: contact; run by ezmlm
> User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv: 
Gecko/20020314 Netscape6/6.2.2
> X-Spam-Rating: 1.6.2 0/1000/N
> List-Post: <>
> List-Subscribe: <>
> List-Unsubscribe: <>
> List-Help: <>
> List-Id: "Tomcat Developers List" <>
> 	I'm new to this list (and the jasper code), so please let me know if 
> submitted this incorrectly.
> 	I was doing some profiling of the server side environment that I work on
> and noticed that quite a bit of time was being used in the JSP engine. After
> further investigation I noticed that each JSP request that comes into the 
> engine generates a new compiler object and attempt at compilation. As much as 
> of the time of a JSP request is wasted this way.
> 	The change I made attempts to read the last modified date from the JSP
> file being request. A comparison is made against known last modified time
> for the current compiled version, if they are different then the code flows
> as it used to. If the times are the same then the rest of loadJSP is skipped.
> 	In my test application which relies on calling ~10 jsp files to generate
> a single page I found a speed improvement of ~25-50ms (on a PIII 650).
> 	There may be better ways to do this. I concentrated my fix here because
> it is where the profiler said the problem was. One drawback of the code I'm
> submitting is that if there are a large number of JSP's the Hashtable I use to
> store information may get large. However I can't see that being a problem 
> a site has >10,000 jsp's.
> 	The change I'm submitting may not be the correct way to approach the
> problem. Either way I think this is an issue that deserves some attention so
> if someone can suggest a better fix please do.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message