Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET performance issue

Reply
Thread Tools

ASP.NET performance issue

 
 
Paul King
Guest
Posts: n/a
 
      07-01-2004
Hi all,

I have written a very simple ASP.NET page on my website that displays the
results of wedding fayres based on the Venue Name selected by the user.

However, when the ASP page loads for the 1st time, this takes quite a long
while to appear (approx 15-20secs). I understand that the ASP has to
generate a process to the IIS server, but is there anyway to speed this
initial process up?

Any help would be great.

Thanks
Paul


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      07-01-2004
The issue is the JIT compilation. IN 1.0, without rearchitecting, you have
to hit the page once before your users do. In 2.0, you can precompile, but
you will not have that capability, officially, until 2005. For assemblies
other than the web app itself, you can ngen, which will make native
binaries, avoiding JIT compilation on those assemblies.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Paul King" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi all,
>
> I have written a very simple ASP.NET page on my website that displays the
> results of wedding fayres based on the Venue Name selected by the user.
>
> However, when the ASP page loads for the 1st time, this takes quite a long
> while to appear (approx 15-20secs). I understand that the ASP has to
> generate a process to the IIS server, but is there anyway to speed this
> initial process up?
>
> Any help would be great.
>
> Thanks
> Paul
>
>



 
Reply With Quote
 
 
 
 
Paul King
Guest
Posts: n/a
 
      07-01-2004
Er.. Whatchawhaddawho?

Your speaking to a person whom just picked up a programming ASP.NET in
VB.net book - not a technical architect.

Are you saying in a nutshell that the code cannot be automatically compiled
before the user hits that page?

Paul.

"Cowboy (Gregory A. Beamer) [MVP]" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> The issue is the JIT compilation. IN 1.0, without rearchitecting, you have
> to hit the page once before your users do. In 2.0, you can precompile, but
> you will not have that capability, officially, until 2005. For assemblies
> other than the web app itself, you can ngen, which will make native
> binaries, avoiding JIT compilation on those assemblies.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ************************************************
> Think Outside the Box!
> ************************************************
> "Paul King" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi all,
> >
> > I have written a very simple ASP.NET page on my website that displays

the
> > results of wedding fayres based on the Venue Name selected by the user.
> >
> > However, when the ASP page loads for the 1st time, this takes quite a

long
> > while to appear (approx 15-20secs). I understand that the ASP has to
> > generate a process to the IIS server, but is there anyway to speed this
> > initial process up?
> >
> > Any help would be great.
> >
> > Thanks
> > Paul
> >
> >

>
>



 
Reply With Quote
 
Craig Deelsnyder
Guest
Posts: n/a
 
      07-01-2004
Paul King wrote:

> Hi all,
>
> I have written a very simple ASP.NET page on my website that displays the
> results of wedding fayres based on the Venue Name selected by the user.
>
> However, when the ASP page loads for the 1st time, this takes quite a long
> while to appear (approx 15-20secs). I understand that the ASP has to
> generate a process to the IIS server, but is there anyway to speed this
> initial process up?
>
> Any help would be great.
>
> Thanks
> Paul
>
>


Sort of a workaround you can use before 2.0 gets here is an approach
Paul Wilson first shared. Someone took his example and made WebToucher,
a HTTPModule that helps by compiling all files when the first page is
hit (unfortunately the very 1st page hit is still needed):

http://www.xmlwebservices.cc/index_Samples.htm

see the link to Paul's article in there...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
 
Reply With Quote
 
Paul King
Guest
Posts: n/a
 
      07-01-2004
Thanks Craig - just what I needed

Bit of a bummer that ASP.NET 1 doesn't do this.


"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:(E-Mail Removed)...
> Paul King wrote:
>
> > Hi all,
> >
> > I have written a very simple ASP.NET page on my website that displays

the
> > results of wedding fayres based on the Venue Name selected by the user.
> >
> > However, when the ASP page loads for the 1st time, this takes quite a

long
> > while to appear (approx 15-20secs). I understand that the ASP has to
> > generate a process to the IIS server, but is there anyway to speed this
> > initial process up?
> >
> > Any help would be great.
> >
> > Thanks
> > Paul
> >
> >

>
> Sort of a workaround you can use before 2.0 gets here is an approach
> Paul Wilson first shared. Someone took his example and made WebToucher,
> a HTTPModule that helps by compiling all files when the first page is
> hit (unfortunately the very 1st page hit is still needed):
>
> http://www.xmlwebservices.cc/index_Samples.htm
>
> see the link to Paul's article in there...
>
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      07-01-2004
> Your speaking to a person whom just picked up a programming ASP.NET in
> VB.net book - not a technical architect.
>
> Are you saying in a nutshell that the code cannot be automatically

compiled
> before the user hits that page?


In a nutshell, yes. However, you will have to become a "technical architect"
before you can understand why. For now, "Always trust content from
Microsoft."

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul King" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Er.. Whatchawhaddawho?
>
> Your speaking to a person whom just picked up a programming ASP.NET in
> VB.net book - not a technical architect.
>
> Are you saying in a nutshell that the code cannot be automatically

compiled
> before the user hits that page?
>
> Paul.
>
> "Cowboy (Gregory A. Beamer) [MVP]" <(E-Mail Removed)>

wrote
> in message news:(E-Mail Removed)...
> > The issue is the JIT compilation. IN 1.0, without rearchitecting, you

have
> > to hit the page once before your users do. In 2.0, you can precompile,

but
> > you will not have that capability, officially, until 2005. For

assemblies
> > other than the web app itself, you can ngen, which will make native
> > binaries, avoiding JIT compilation on those assemblies.
> >
> > --
> > Gregory A. Beamer
> > MVP; MCP: +I, SE, SD, DBA
> >
> > ************************************************
> > Think Outside the Box!
> > ************************************************
> > "Paul King" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > Hi all,
> > >
> > > I have written a very simple ASP.NET page on my website that displays

> the
> > > results of wedding fayres based on the Venue Name selected by the

user.
> > >
> > > However, when the ASP page loads for the 1st time, this takes quite a

> long
> > > while to appear (approx 15-20secs). I understand that the ASP has to
> > > generate a process to the IIS server, but is there anyway to speed

this
> > > initial process up?
> > >
> > > Any help would be great.
> > >
> > > Thanks
> > > Paul
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
darrel
Guest
Posts: n/a
 
      07-01-2004
> Are you saying in a nutshell that the code cannot be automatically
compiled
> before the user hits that page?


I'm not an expert, but this is how I understand it:

If you are using code behind and building compilled DLLs and publishing the
site via that method, then yes, those are all precompiled.

If, on the other hand, you are using inline vb.net on the ASPX pages and/or
using SRC files (instead of codebehind files) then the server needs to
compile it the first time the page is requested, and then caches it
thereafter.

Now, my first 'if' may be incorrect (about dll's already being pre-compiled)
so someone please correct me if I am wrong on that one.

-Darrel


 
Reply With Quote
 
Paul King
Guest
Posts: n/a
 
      07-01-2004
Loud and clear Kevin. I will leave Microsoft for the cleaver stuff


"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> > Your speaking to a person whom just picked up a programming ASP.NET in
> > VB.net book - not a technical architect.
> >
> > Are you saying in a nutshell that the code cannot be automatically

> compiled
> > before the user hits that page?

>
> In a nutshell, yes. However, you will have to become a "technical

architect"
> before you can understand why. For now, "Always trust content from
> Microsoft."
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Paul King" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Er.. Whatchawhaddawho?
> >
> > Your speaking to a person whom just picked up a programming ASP.NET in
> > VB.net book - not a technical architect.
> >
> > Are you saying in a nutshell that the code cannot be automatically

> compiled
> > before the user hits that page?
> >
> > Paul.
> >
> > "Cowboy (Gregory A. Beamer) [MVP]" <(E-Mail Removed)>

> wrote
> > in message news:(E-Mail Removed)...
> > > The issue is the JIT compilation. IN 1.0, without rearchitecting, you

> have
> > > to hit the page once before your users do. In 2.0, you can precompile,

> but
> > > you will not have that capability, officially, until 2005. For

> assemblies
> > > other than the web app itself, you can ngen, which will make native
> > > binaries, avoiding JIT compilation on those assemblies.
> > >
> > > --
> > > Gregory A. Beamer
> > > MVP; MCP: +I, SE, SD, DBA
> > >
> > > ************************************************
> > > Think Outside the Box!
> > > ************************************************
> > > "Paul King" <(E-Mail Removed)> wrote in message
> > > news:%(E-Mail Removed)...
> > > > Hi all,
> > > >
> > > > I have written a very simple ASP.NET page on my website that

displays
> > the
> > > > results of wedding fayres based on the Venue Name selected by the

> user.
> > > >
> > > > However, when the ASP page loads for the 1st time, this takes quite

a
> > long
> > > > while to appear (approx 15-20secs). I understand that the ASP has

to
> > > > generate a process to the IIS server, but is there anyway to speed

> this
> > > > initial process up?
> > > >
> > > > Any help would be great.
> > > >
> > > > Thanks
> > > > Paul
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Craig Deelsnyder
Guest
Posts: n/a
 
      07-01-2004
darrel wrote:

>>Are you saying in a nutshell that the code cannot be automatically

>
> compiled
>
>>before the user hits that page?

>
>
> I'm not an expert, but this is how I understand it:
>
> If you are using code behind and building compilled DLLs and publishing the
> site via that method, then yes, those are all precompiled.
>
> If, on the other hand, you are using inline vb.net on the ASPX pages and/or
> using SRC files (instead of codebehind files) then the server needs to
> compile it the first time the page is requested, and then caches it
> thereafter.
>
> Now, my first 'if' may be incorrect (about dll's already being pre-compiled)
> so someone please correct me if I am wrong on that one.
>
> -Darrel
>
>

Well, it's a little confusing, what you're saying is of course
technically correct, you (usually) are creating dll files, which are
called compiled code. However, the webserver itself also does some
loading/compiling itself, when things are called. The most common
example is that all .aspx files are converted into classes at runtime
(the page's rendering, creating of controls, etc. is all created behind
the scenes), and those are then compiled inside the webserver's memory
(the aspnet process). They're kept there until the app comes down or is
recycled.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
 
Reply With Quote
 
Craig Deelsnyder
Guest
Posts: n/a
 
      07-01-2004
Paul King wrote:

> Thanks Craig - just what I needed
>
> Bit of a bummer that ASP.NET 1 doesn't do this.
>
>
> "Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
> news:(E-Mail Removed)...
>
>>Paul King wrote:
>>
>>
>>>Hi all,
>>>
>>>I have written a very simple ASP.NET page on my website that displays

>
> the
>
>>>results of wedding fayres based on the Venue Name selected by the user.
>>>
>>>However, when the ASP page loads for the 1st time, this takes quite a

>
> long
>
>>>while to appear (approx 15-20secs). I understand that the ASP has to
>>>generate a process to the IIS server, but is there anyway to speed this
>>>initial process up?
>>>
>>>Any help would be great.
>>>
>>>Thanks
>>>Paul
>>>
>>>

>>
>>Sort of a workaround you can use before 2.0 gets here is an approach
>>Paul Wilson first shared. Someone took his example and made WebToucher,
>>a HTTPModule that helps by compiling all files when the first page is
>>hit (unfortunately the very 1st page hit is still needed):
>>
>>http://www.xmlwebservices.cc/index_Samples.htm
>>
>>see the link to Paul's article in there...
>>
>>--
>>Craig Deelsnyder
>>Microsoft MVP - ASP/ASP.NET

>
>
>

The only thing is (in case you didn't catch it) is that the very first
hit to any page once your app is up will still have this delay as
everything is compiled; that's what I mean by 'very 1st page hit is
needed'. The advantage is that it's not the 1st hit of EVERY page via
the browser. But I would verify that this module does the rest of the
files asynchronously, which I would hope but haven't looked at.
Otherwise your very 1st guy coming in has to wait for the whole site to
compile....so then you'd have to weigh which is worse by testing the
delays....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance Tutorials Services - Boosting Performance by DisablingUnnecessary Services on Windows XP Home Edition Software Engineer Javascript 0 06-10-2011 02:18 AM
GDI+ performance issue **ham ASP .Net 10 12-14-2004 06:36 PM
Re: Webservice Performance Issue Kevin Spencer ASP .Net 4 07-06-2004 01:40 PM
ASP.NET Session Management Performance issue Akshay Kumar ASP .Net 1 07-02-2004 05:40 PM
Web Form Performance Versus Single File Performance jm ASP .Net 1 12-12-2003 11:14 PM



Advertisments