I bet this is because you are using a session. The first time a session is
created via tomcat, ot initially takes a long time as it generates a list of
primes for session ID's (IIRC). This will only happen the first time a
session is used via tomcat, all further uses of sessions don't have the same
delay. Some people have gone as far to run a bootstrap servlet when they
start tomcat specifically to create a session so users don't see the delay
sam
----- Original Message -----
From: "pedro salazar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 10:01 AM
Subject: creating a instance of a servlet: takes too long!!
> Greetings,
>
> why is that my servlet when the first time is invoked, it takes about 30
> seconds or more to start when the servlets that came in tomcat are
> instantaneous? After the servlet container instantiated and initialized my
> servlet, all the following requests are very fast. Is there any advice for
> what we should do and don't do in init() method? I just initialize some
> properties and a connection pool....
> Well is it possible that my servlet container at any time my may shutdown
my
> servlet to release memory, and another time it will be requested to start
> again and take another time too long to start, correct?
>
> How can I benchmark the time of instantiation of my servlet and the time
of
> my init method?
>
> System configuration:
> -Tomcat 3.2.1
> -JDK 1.3
> -Linux RedHat 6.2 [kernel 2.2.18]
> -PII400Mhz 256Mbytes
>
> thanks.
>
> --
> <psalazar/>
>
>
___________________________________________________________________________
> 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
___________________________________________________________________________
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