Duncan, I looked at your patch carefully, looks like Remy's work on
jasper2 already addressed the issues that you are trying to solved.
In fact, Remy only creates a compiler for the container, whereas you
would have created a compiler for each jsp page.  OTOH, you save the
modification date for each page in a hashtable, so is potentially
faster when checking whether a jsp needs to be send to the compiler.
I may incoporate your idea on this one later, maybe reusing the
JspServletWrapper class instead of using another hashtabl, since that
**IS** a per page object.

Thanks again for the patch.  If you wish, you should try running with
japser2, and compare its performance with the one you patched.


> Date: Fri, 19 Apr 2002 16:58:54 -0700 (PDT)
> From: Kin-Man Chung <[EMAIL PROTECTED]>
> Subject: Re: [PATCH] possible speed enhancement to JspServlet.java
> To: [EMAIL PROTECTED]
> MIME-version: 1.0
> Content-transfer-encoding: 7BIT
> Content-MD5: Pd6UqZXWO7AIRUPw9V+AAQ==
> Delivered-to: mailing list [EMAIL PROTECTED]
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> List-Post: <mailto:[EMAIL PROTECTED]>
> List-Subscribe: <mailto:[EMAIL PROTECTED]>
> List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
> List-Help: <mailto:[EMAIL PROTECTED]>
> List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org>
> 
> 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 <[EMAIL PROTECTED]>
> > Subject: [PATCH] possible speed enhancement to JspServlet.java
> > To: Tomcat Developers List <[EMAIL PROTECTED]>
> > MIME-version: 1.0
> > Content-transfer-encoding: 7bit
> > X-Accept-Language: en,pdf
> > Delivered-to: mailing list [EMAIL PROTECTED]
> > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> > User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4.1) 
> Gecko/20020314 Netscape6/6.2.2
> > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> > List-Post: <mailto:[EMAIL PROTECTED]>
> > List-Subscribe: <mailto:[EMAIL PROTECTED]>
> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
> > List-Help: <mailto:[EMAIL PROTECTED]>
> > List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org>
> > 
> >     I'm new to this list (and the jasper code), so please let me know if 
> I've
> > 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 
> jasper
> > engine generates a new compiler object and attempt at compilation. As much 
as 
> 15%
> > 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 
> until
> > 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:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to