On Mon, 19 Jun 2000, Carl Ruhle wrote:

> because the first time the servlet is execute it must be
> compiled. after that it is the java class file that is called

Not quite correct -- servlets are already compiled, the difference is
that on the first invocation, the servlet is loaded into the JVM.
Whether that accounts for the entire time difference here, I do not
know, and may require further looking in to.

Now, JSP pages, if changed since the last invocation (or if there was
no previous invocation), do get compiled when invoked.

Some servlet containers/engines allow servlets to be pre-loaded.  If
the original poster is using one that does allow this, they can try it
out to see how the response time changes.

Similarly, some servlet containers/engines allow JSP pages to be
pre-compiled.


> -----Original Message-----
> From: <Shivashis Bose> <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Segunda-feira, 19 de Junho de 2000 19:30
> Subject: Execution time for a servlet
>
> >Hi
> >
> >I am using a servlet to fetch data from MS Access database and
> >display it to the browser. On the first invocation of the servlet,
> >the time taken is around 6secs.  If the servlet is invoked again,
> >the time redues to around 2 to 3 seconds. I am running the servlet
> >on Windows 95.
> >
> >Could someone explain me the reason for the different values of the
> >servlet's execution time.
> >
>

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to