By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,583 Members | 1,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,583 IT Pros & Developers. It's quick & easy.

ASP.NET application and first time load

P: n/a
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a typical
aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the
application to fully load. every subsequent access to that application takes
1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is
about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application will,
again, take 17 seconds to load, but only 2 of those seconds are used by the
application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason
Nov 19 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
The first time lag you experience is ASP reloading the worker process for
your application. This includes any recompilations needed. This happens
outside the scopr of the application. So there is a delay, then your app
runs and logs its load time.

MattC
"Jason" <c_*******@mighty.co.za> wrote in message
news:Of*************@TK2MSFTNGP14.phx.gbl...
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a
typical
aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the
application to fully load. every subsequent access to that application
takes
1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is
about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application
will,
again, take 17 seconds to load, but only 2 of those seconds are used by
the
application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason

Nov 19 '05 #2

P: n/a
thanks
any documentation where i can read up on these recompilations?

thanks again
any other suggestions?

"MattC" <m@m.com> wrote in message
news:uU**************@TK2MSFTNGP12.phx.gbl...
The first time lag you experience is ASP reloading the worker process for
your application. This includes any recompilations needed. This happens
outside the scopr of the application. So there is a delay, then your app
runs and logs its load time.

MattC
"Jason" <c_*******@mighty.co.za> wrote in message
news:Of*************@TK2MSFTNGP14.phx.gbl...
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a
typical
aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the application to fully load. every subsequent access to that application
takes
1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application
will,
again, take 17 seconds to load, but only 2 of those seconds are used by
the
application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason


Nov 19 '05 #3

P: n/a
Hey Jason,

The first time a ASP.NET application runs it has to compile the MSIL code
into Native code for execution and then start responding to request made by
the client (browser).
and any other request made after the first one (the one that starts the
application)
the native code is already present with the framework it need not recompile
the MSIL code to native code.
Hence, anytime you access your application for the first time it is much
slower than any subsequent access.

************************************
Hope this helps,
Shaun
http://blogs.wwwcoder.com/shaunakp
************************************

"Jason" wrote:
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a typical
aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the
application to fully load. every subsequent access to that application takes
1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is
about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application will,
again, take 17 seconds to load, but only 2 of those seconds are used by the
application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason

Nov 19 '05 #4

P: n/a
excellent, thanks.
so not much i can do about it?
is there a website i can read regarding this?
"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
Hey Jason,

The first time a ASP.NET application runs it has to compile the MSIL code
into Native code for execution and then start responding to request made by the client (browser).
and any other request made after the first one (the one that starts the
application)
the native code is already present with the framework it need not recompile the MSIL code to native code.
Hence, anytime you access your application for the first time it is much
slower than any subsequent access.

************************************
Hope this helps,
Shaun
http://blogs.wwwcoder.com/shaunakp
************************************

"Jason" wrote:
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a typical aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the application to fully load. every subsequent access to that application takes 1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application will, again, take 17 seconds to load, but only 2 of those seconds are used by the application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason

Nov 19 '05 #5

P: n/a
Hey Jason,

As far as my understanding goes nothing can be done about it , but i fail to
see the problem since this will just happen the very first time the
application is started it wont affect much.

well dont know abt sites, but i am sure this will be documented on MSDN site
, google a bit on this, or have a look at MS Press 70-320

under the section

Chapter 1 : Understanding the .NET Framework -
Lesson 2: Understanding the Common Language
Runtime
******************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
******************************

"Jason" wrote:
excellent, thanks.
so not much i can do about it?
is there a website i can read regarding this?
"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
Hey Jason,

The first time a ASP.NET application runs it has to compile the MSIL code
into Native code for execution and then start responding to request made

by
the client (browser).
and any other request made after the first one (the one that starts the
application)
the native code is already present with the framework it need not

recompile
the MSIL code to native code.
Hence, anytime you access your application for the first time it is much
slower than any subsequent access.

************************************
Hope this helps,
Shaun
http://blogs.wwwcoder.com/shaunakp
************************************

"Jason" wrote:
Hi

I have a "problem"
i have got a ASP.NET application. in this application i have included
logging. in the logging i have logged how many seconds it takes for this
application to fully load.
i have placed these timing loggings in the Load and Init events on a typical aspx page. i.e. first line of code in Page_Load is
DateTime dtStart = DateTime.Now;
and the last lines of code are
DateTime dtEnd = DateTime.Now;
TimeSpan timeTaken = dtStart - dtEnd;
// log result to log files;
according to my log files, for the first load, it takes 2 seconds for the application to fully load. every subsequent access to that application takes 1 second or less to fully load. yet, when i manually count the seconds
between clicking "Go" and the time the application is fully loaded, it is about 17 seconds.

NOTE: the above is a first time load (restarting the web server, or
restarting IIS). every load (from "Go" to "finish") after that, takes 2
seconds or less. Restarting IIS service will then mean the application will, again, take 17 seconds to load, but only 2 of those seconds are used by the application.

Are their events i am missing that i should be timing?
is it really IIS that is actually taking up all the time?
what can i do about this first time hit?

Thanks.
Hope i have made sense, if not, lemme know so i can clarify
Jason


Nov 19 '05 #6

P: n/a
Thanks

I also dont see it as a problem. but clients can be a pain in the butt. and
the customer is always right. sigh
Thanks for the help

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
Hey Jason,

As far as my understanding goes nothing can be done about it , but i fail to see the problem since this will just happen the very first time the
application is started it wont affect much.

well dont know abt sites, but i am sure this will be documented on MSDN site , google a bit on this, or have a look at MS Press 70-320

under the section

Chapter 1 : Understanding the .NET Framework -
Lesson 2: Understanding the Common Language
Runtime
******************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
******************************

"Jason" wrote:
excellent, thanks.
so not much i can do about it?
is there a website i can read regarding this?
"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
Hey Jason,

The first time a ASP.NET application runs it has to compile the MSIL code into Native code for execution and then start responding to request made
by
the client (browser).
and any other request made after the first one (the one that starts
the application)
the native code is already present with the framework it need not

recompile
the MSIL code to native code.
Hence, anytime you access your application for the first time it is much slower than any subsequent access.

************************************
Hope this helps,
Shaun
http://blogs.wwwcoder.com/shaunakp
************************************

"Jason" wrote:

> Hi
>
> I have a "problem"
> i have got a ASP.NET application. in this application i have included > logging. in the logging i have logged how many seconds it takes for this > application to fully load.
> i have placed these timing loggings in the Load and Init events on a

typical
> aspx page. i.e. first line of code in Page_Load is
> DateTime dtStart = DateTime.Now;
> and the last lines of code are
> DateTime dtEnd = DateTime.Now;
> TimeSpan timeTaken = dtStart - dtEnd;
> // log result to log files;
> according to my log files, for the first load, it takes 2 seconds for the
> application to fully load. every subsequent access to that
application takes
> 1 second or less to fully load. yet, when i manually count the
seconds > between clicking "Go" and the time the application is fully loaded, it is
> about 17 seconds.
>
> NOTE: the above is a first time load (restarting the web server, or
> restarting IIS). every load (from "Go" to "finish") after that,
takes 2 > seconds or less. Restarting IIS service will then mean the

application will,
> again, take 17 seconds to load, but only 2 of those seconds are used
by the
> application.
>
> Are their events i am missing that i should be timing?
> is it really IIS that is actually taking up all the time?
> what can i do about this first time hit?
>
> Thanks.
> Hope i have made sense, if not, lemme know so i can clarify
> Jason
>
>
>


Nov 19 '05 #7

P: n/a
hahaha
Yup , clients are the tough ones to convince :) best of luck in that front

*********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
Thanks

I also dont see it as a problem. but clients can be a pain in the butt. and
the customer is always right. sigh
Thanks for the help

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
Hey Jason,

As far as my understanding goes nothing can be done about it , but i fail

to
see the problem since this will just happen the very first time the
application is started it wont affect much.

well dont know abt sites, but i am sure this will be documented on MSDN

site
, google a bit on this, or have a look at MS Press 70-320

under the section

Chapter 1 : Understanding the .NET Framework -
Lesson 2: Understanding the Common Language
Runtime
******************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
******************************

"Jason" wrote:
excellent, thanks.
so not much i can do about it?
is there a website i can read regarding this?
"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
> Hey Jason,
>
> The first time a ASP.NET application runs it has to compile the MSIL code > into Native code for execution and then start responding to request made by
> the client (browser).
> and any other request made after the first one (the one that starts the > application)
> the native code is already present with the framework it need not
recompile
> the MSIL code to native code.
> Hence, anytime you access your application for the first time it is much > slower than any subsequent access.
>
> ************************************
> Hope this helps,
> Shaun
> http://blogs.wwwcoder.com/shaunakp
> ************************************
>
> "Jason" wrote:
>
> > Hi
> >
> > I have a "problem"
> > i have got a ASP.NET application. in this application i have included > > logging. in the logging i have logged how many seconds it takes for this > > application to fully load.
> > i have placed these timing loggings in the Load and Init events on a
typical
> > aspx page. i.e. first line of code in Page_Load is
> > DateTime dtStart = DateTime.Now;
> > and the last lines of code are
> > DateTime dtEnd = DateTime.Now;
> > TimeSpan timeTaken = dtStart - dtEnd;
> > // log result to log files;
> > according to my log files, for the first load, it takes 2 seconds for the
> > application to fully load. every subsequent access to that application takes
> > 1 second or less to fully load. yet, when i manually count the seconds > > between clicking "Go" and the time the application is fully loaded, it is
> > about 17 seconds.
> >
> > NOTE: the above is a first time load (restarting the web server, or
> > restarting IIS). every load (from "Go" to "finish") after that, takes 2 > > seconds or less. Restarting IIS service will then mean the application will,
> > again, take 17 seconds to load, but only 2 of those seconds are used by the
> > application.
> >
> > Are their events i am missing that i should be timing?
> > is it really IIS that is actually taking up all the time?
> > what can i do about this first time hit?
> >
> > Thanks.
> > Hope i have made sense, if not, lemme know so i can clarify
> > Jason
> >
> >
> >


Nov 19 '05 #8

P: n/a
luckily we have a windows service supporting the ASP.NET applications. from
there we can do WebClient.OpenReads to the various pages, effectively
"firing" that compilation.
one more step.

is it possible to determine if the IIS Admin service was just started? are
their events we can subscribe to perhaps??

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
hahaha
Yup , clients are the tough ones to convince :) best of luck in that front

*********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
Thanks

I also dont see it as a problem. but clients can be a pain in the butt. and the customer is always right. sigh
Thanks for the help

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
Hey Jason,

As far as my understanding goes nothing can be done about it , but i fail
to
see the problem since this will just happen the very first time the
application is started it wont affect much.

well dont know abt sites, but i am sure this will be documented on
MSDN site
, google a bit on this, or have a look at MS Press 70-320

under the section

Chapter 1 : Understanding the .NET Framework -
Lesson 2: Understanding the Common
Language Runtime
******************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
******************************

"Jason" wrote:

> excellent, thanks.
> so not much i can do about it?
> is there a website i can read regarding this?
> "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> news:AA**********************************@microsof t.com...
> > Hey Jason,
> >
> > The first time a ASP.NET application runs it has to compile the MSIL code
> > into Native code for execution and then start responding to
request made
> by
> > the client (browser).
> > and any other request made after the first one (the one that
starts the
> > application)
> > the native code is already present with the framework it need not
> recompile
> > the MSIL code to native code.
> > Hence, anytime you access your application for the first time it
is much
> > slower than any subsequent access.
> >
> > ************************************
> > Hope this helps,
> > Shaun
> > http://blogs.wwwcoder.com/shaunakp
> > ************************************
> >
> > "Jason" wrote:
> >
> > > Hi
> > >
> > > I have a "problem"
> > > i have got a ASP.NET application. in this application i have

included
> > > logging. in the logging i have logged how many seconds it takes
for this
> > > application to fully load.
> > > i have placed these timing loggings in the Load and Init events
on a > typical
> > > aspx page. i.e. first line of code in Page_Load is
> > > DateTime dtStart = DateTime.Now;
> > > and the last lines of code are
> > > DateTime dtEnd = DateTime.Now;
> > > TimeSpan timeTaken = dtStart - dtEnd;
> > > // log result to log files;
> > > according to my log files, for the first load, it takes 2 seconds for
> the
> > > application to fully load. every subsequent access to that

application
> takes
> > > 1 second or less to fully load. yet, when i manually count the

seconds
> > > between clicking "Go" and the time the application is fully
loaded, it
> is
> > > about 17 seconds.
> > >
> > > NOTE: the above is a first time load (restarting the web server,
or > > > restarting IIS). every load (from "Go" to "finish") after that,

takes 2
> > > seconds or less. Restarting IIS service will then mean the

application
> will,
> > > again, take 17 seconds to load, but only 2 of those seconds are

used by
> the
> > > application.
> > >
> > > Are their events i am missing that i should be timing?
> > > is it really IIS that is actually taking up all the time?
> > > what can i do about this first time hit?
> > >
> > > Thanks.
> > > Hope i have made sense, if not, lemme know so i can clarify
> > > Jason
> > >
> > >
> > >
>
>
>


Nov 19 '05 #9

P: n/a
hey
am not understanding the problem exactly could you elaborate on it please
********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
luckily we have a windows service supporting the ASP.NET applications. from
there we can do WebClient.OpenReads to the various pages, effectively
"firing" that compilation.
one more step.

is it possible to determine if the IIS Admin service was just started? are
their events we can subscribe to perhaps??

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
hahaha
Yup , clients are the tough ones to convince :) best of luck in that front

*********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
Thanks

I also dont see it as a problem. but clients can be a pain in the butt. and the customer is always right. sigh
Thanks for the help

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
> Hey Jason,
>
> As far as my understanding goes nothing can be done about it , but i fail to
> see the problem since this will just happen the very first time the
> application is started it wont affect much.
>
> well dont know abt sites, but i am sure this will be documented on MSDN site
> , google a bit on this, or have a look at MS Press 70-320
>
> under the section
>
> Chapter 1 : Understanding the .NET Framework -
> Lesson 2: Understanding the Common Language > Runtime
>
>
> ******************************
> Hope this helps,
> Shaun (M.C.P)
>
> http://blogs.wwwcoder.com/shaunakp
> ******************************
>
> "Jason" wrote:
>
> > excellent, thanks.
> > so not much i can do about it?
> > is there a website i can read regarding this?
> > "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> > news:AA**********************************@microsof t.com...
> > > Hey Jason,
> > >
> > > The first time a ASP.NET application runs it has to compile the MSIL code
> > > into Native code for execution and then start responding to request made
> > by
> > > the client (browser).
> > > and any other request made after the first one (the one that starts the
> > > application)
> > > the native code is already present with the framework it need not
> > recompile
> > > the MSIL code to native code.
> > > Hence, anytime you access your application for the first time it is much
> > > slower than any subsequent access.
> > >
> > > ************************************
> > > Hope this helps,
> > > Shaun
> > > http://blogs.wwwcoder.com/shaunakp
> > > ************************************
> > >
> > > "Jason" wrote:
> > >
> > > > Hi
> > > >
> > > > I have a "problem"
> > > > i have got a ASP.NET application. in this application i have
included
> > > > logging. in the logging i have logged how many seconds it takes for this
> > > > application to fully load.
> > > > i have placed these timing loggings in the Load and Init events on a > > typical
> > > > aspx page. i.e. first line of code in Page_Load is
> > > > DateTime dtStart = DateTime.Now;
> > > > and the last lines of code are
> > > > DateTime dtEnd = DateTime.Now;
> > > > TimeSpan timeTaken = dtStart - dtEnd;
> > > > // log result to log files;
> > > > according to my log files, for the first load, it takes 2 seconds for
> > the
> > > > application to fully load. every subsequent access to that
application
> > takes
> > > > 1 second or less to fully load. yet, when i manually count the
seconds
> > > > between clicking "Go" and the time the application is fully loaded, it
> > is
> > > > about 17 seconds.
> > > >
> > > > NOTE: the above is a first time load (restarting the web server, or > > > > restarting IIS). every load (from "Go" to "finish") after that,
takes 2
> > > > seconds or less. Restarting IIS service will then mean the
application
> > will,
> > > > again, take 17 seconds to load, but only 2 of those seconds are used by
> > the
> > > > application.
> > > >
> > > > Are their events i am missing that i should be timing?
> > > > is it really IIS that is actually taking up all the time?
> > > > what can i do about this first time hit?
> > > >
> > > > Thanks.
> > > > Hope i have made sense, if not, lemme know so i can clarify
> > > > Jason
> > > >
> > > >
> > > >
> >
> >
> >


Nov 19 '05 #10

P: n/a
how would i programmatically know that the IIS Admin service was just
started?
i.e. the administrator of that particular web server went and stopped the
IIS Admin service, then started it up again. is there a way of knowing that
the service was just started?

not sure how else i can ask this....

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
hey
am not understanding the problem exactly could you elaborate on it please
********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
luckily we have a windows service supporting the ASP.NET applications. from there we can do WebClient.OpenReads to the various pages, effectively
"firing" that compilation.
one more step.

is it possible to determine if the IIS Admin service was just started? are their events we can subscribe to perhaps??

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
hahaha
Yup , clients are the tough ones to convince :) best of luck in that front
*********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:

> Thanks
>
> I also dont see it as a problem. but clients can be a pain in the butt.
and
> the customer is always right. sigh
> Thanks for the help
>
> "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> news:B6**********************************@microsof t.com...
> > Hey Jason,
> >
> > As far as my understanding goes nothing can be done about it , but
i fail
> to
> > see the problem since this will just happen the very first time th
e > > application is started it wont affect much.
> >
> > well dont know abt sites, but i am sure this will be documented on

MSDN
> site
> > , google a bit on this, or have a look at MS Press 70-320
> >
> > under the section
> >
> > Chapter 1 : Understanding the .NET Framework -
> > Lesson 2: Understanding the Common

Language
> > Runtime
> >
> >
> > ******************************
> > Hope this helps,
> > Shaun (M.C.P)
> >
> > http://blogs.wwwcoder.com/shaunakp
> > ******************************
> >
> > "Jason" wrote:
> >
> > > excellent, thanks.
> > > so not much i can do about it?
> > > is there a website i can read regarding this?
> > > "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> > > news:AA**********************************@microsof t.com...
> > > > Hey Jason,
> > > >
> > > > The first time a ASP.NET application runs it has to compile the MSIL
> code
> > > > into Native code for execution and then start responding to

request
> made
> > > by
> > > > the client (browser).
> > > > and any other request made after the first one (the one that

starts
> the
> > > > application)
> > > > the native code is already present with the framework it need
not > > > recompile
> > > > the MSIL code to native code.
> > > > Hence, anytime you access your application for the first time it is
> much
> > > > slower than any subsequent access.
> > > >
> > > > ************************************
> > > > Hope this helps,
> > > > Shaun
> > > > http://blogs.wwwcoder.com/shaunakp
> > > > ************************************
> > > >
> > > > "Jason" wrote:
> > > >
> > > > > Hi
> > > > >
> > > > > I have a "problem"
> > > > > i have got a ASP.NET application. in this application i have
> included
> > > > > logging. in the logging i have logged how many seconds it
takes for
> this
> > > > > application to fully load.
> > > > > i have placed these timing loggings in the Load and Init
events on a
> > > typical
> > > > > aspx page. i.e. first line of code in Page_Load is
> > > > > DateTime dtStart = DateTime.Now;
> > > > > and the last lines of code are
> > > > > DateTime dtEnd = DateTime.Now;
> > > > > TimeSpan timeTaken = dtStart - dtEnd;
> > > > > // log result to log files;
> > > > > according to my log files, for the first load, it takes 2

seconds
> for
> > > the
> > > > > application to fully load. every subsequent access to that
> application
> > > takes
> > > > > 1 second or less to fully load. yet, when i manually count
the > seconds
> > > > > between clicking "Go" and the time the application is fully

loaded,
> it
> > > is
> > > > > about 17 seconds.
> > > > >
> > > > > NOTE: the above is a first time load (restarting the web server, or
> > > > > restarting IIS). every load (from "Go" to "finish") after
that, > takes 2
> > > > > seconds or less. Restarting IIS service will then mean the
> application
> > > will,
> > > > > again, take 17 seconds to load, but only 2 of those seconds

are used
> by
> > > the
> > > > > application.
> > > > >
> > > > > Are their events i am missing that i should be timing?
> > > > > is it really IIS that is actually taking up all the time?
> > > > > what can i do about this first time hit?
> > > > >
> > > > > Thanks.
> > > > > Hope i have made sense, if not, lemme know so i can clarify
> > > > > Jason
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>


Nov 19 '05 #11

P: n/a
Not sure if i understood your qts correctly but
you can build a Windows service inheriting from Service Controll Manager
class or something (not sure about the exact name) using which you can
monitor services running on the machine and inturn fire and event to your
custom service using Custom Commands whenever the IIS service event that you
want to trap is fired.

e.g

the Custom service that you inherit from SCM will monitor IIS Service and
fire a custom command to the service to take some action whenever the IIS
service is shut down or fired up

Let me know if this helps

********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
how would i programmatically know that the IIS Admin service was just
started?
i.e. the administrator of that particular web server went and stopped the
IIS Admin service, then started it up again. is there a way of knowing that
the service was just started?

not sure how else i can ask this....

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
hey
am not understanding the problem exactly could you elaborate on it please
********************************
Hope this helps,
Shaun (M.C.P)

http://blogs.wwwcoder.com/shaunakp
*********************************

"Jason" wrote:
luckily we have a windows service supporting the ASP.NET applications. from there we can do WebClient.OpenReads to the various pages, effectively
"firing" that compilation.
one more step.

is it possible to determine if the IIS Admin service was just started? are their events we can subscribe to perhaps??

"S h a u n" <Sh***@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
> hahaha
> Yup , clients are the tough ones to convince :) best of luck in that front >
> *********************************
> Hope this helps,
> Shaun (M.C.P)
>
> http://blogs.wwwcoder.com/shaunakp
> *********************************
>
> "Jason" wrote:
>
> > Thanks
> >
> > I also dont see it as a problem. but clients can be a pain in the butt. and
> > the customer is always right. sigh
> > Thanks for the help
> >
> > "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> > news:B6**********************************@microsof t.com...
> > > Hey Jason,
> > >
> > > As far as my understanding goes nothing can be done about it , but i fail
> > to
> > > see the problem since this will just happen the very first time th e > > > application is started it wont affect much.
> > >
> > > well dont know abt sites, but i am sure this will be documented on
MSDN
> > site
> > > , google a bit on this, or have a look at MS Press 70-320
> > >
> > > under the section
> > >
> > > Chapter 1 : Understanding the .NET Framework -
> > > Lesson 2: Understanding the Common
Language
> > > Runtime
> > >
> > >
> > > ******************************
> > > Hope this helps,
> > > Shaun (M.C.P)
> > >
> > > http://blogs.wwwcoder.com/shaunakp
> > > ******************************
> > >
> > > "Jason" wrote:
> > >
> > > > excellent, thanks.
> > > > so not much i can do about it?
> > > > is there a website i can read regarding this?
> > > > "S h a u n" <Sh***@discussions.microsoft.com> wrote in message
> > > > news:AA**********************************@microsof t.com...
> > > > > Hey Jason,
> > > > >
> > > > > The first time a ASP.NET application runs it has to compile the MSIL
> > code
> > > > > into Native code for execution and then start responding to
request
> > made
> > > > by
> > > > > the client (browser).
> > > > > and any other request made after the first one (the one that
starts
> > the
> > > > > application)
> > > > > the native code is already present with the framework it need not > > > > recompile
> > > > > the MSIL code to native code.
> > > > > Hence, anytime you access your application for the first time it is
> > much
> > > > > slower than any subsequent access.
> > > > >
> > > > > ************************************
> > > > > Hope this helps,
> > > > > Shaun
> > > > > http://blogs.wwwcoder.com/shaunakp
> > > > > ************************************
> > > > >
> > > > > "Jason" wrote:
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > I have a "problem"
> > > > > > i have got a ASP.NET application. in this application i have
> > included
> > > > > > logging. in the logging i have logged how many seconds it takes for
> > this
> > > > > > application to fully load.
> > > > > > i have placed these timing loggings in the Load and Init events on a
> > > > typical
> > > > > > aspx page. i.e. first line of code in Page_Load is
> > > > > > DateTime dtStart = DateTime.Now;
> > > > > > and the last lines of code are
> > > > > > DateTime dtEnd = DateTime.Now;
> > > > > > TimeSpan timeTaken = dtStart - dtEnd;
> > > > > > // log result to log files;
> > > > > > according to my log files, for the first load, it takes 2
seconds
> > for
> > > > the
> > > > > > application to fully load. every subsequent access to that
> > application
> > > > takes
> > > > > > 1 second or less to fully load. yet, when i manually count the > > seconds
> > > > > > between clicking "Go" and the time the application is fully
loaded,
> > it
> > > > is
> > > > > > about 17 seconds.
> > > > > >
> > > > > > NOTE: the above is a first time load (restarting the web server, or
> > > > > > restarting IIS). every load (from "Go" to "finish") after that, > > takes 2
> > > > > > seconds or less. Restarting IIS service will then mean the
> > application
> > > > will,
> > > > > > again, take 17 seconds to load, but only 2 of those seconds are used
> > by
> > > > the
> > > > > > application.
> > > > > >
> > > > > > Are their events i am missing that i should be timing?
> > > > > > is it really IIS that is actually taking up all the time?
> > > > > > what can i do about this first time hit?
> > > > > >
> > > > > > Thanks.
> > > > > > Hope i have made sense, if not, lemme know so i can clarify
> > > > > > Jason
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Nov 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.