Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Startup delay due to compiling

Reply
Thread Tools

Startup delay due to compiling

 
 
Chris Zopers
Guest
Posts: n/a
 
      06-23-2008
Hello,

To prevent my webapplication from compiling when a user first visit's
the site, I precompile the application with the aspnet_compiler tool
(aspnet_compiler -p physicalOrRelativePath -v / targetPath).

When the application ends/stops because of inactivity for a while, it
still takes some time when a user tries to access the site again. This
is only on the first visit after the site has stopped, after that
everything works fine and fast. FYI, I do not use any code in the
Application_Start event, so that can't be the problem.

Anyone got an idea, am I doing something wrong perhaps with the compiler
tool?

Greetings,
Chris

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      06-23-2008
No, you're not doing anything wrong, this is the way it is. You compile the
site into Intermediate Language (IL). When the application starts up, it
compiles it into machine language and caches that and assigns resources.
Part of the delay is just the application starting up again regardless of
anything going on in the Application_Start event.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Chris Zopers" <> wrote in message
news:...
> Hello,
>
> To prevent my webapplication from compiling when a user first visit's
> the site, I precompile the application with the aspnet_compiler tool
> (aspnet_compiler -p physicalOrRelativePath -v / targetPath).
>
> When the application ends/stops because of inactivity for a while, it
> still takes some time when a user tries to access the site again. This
> is only on the first visit after the site has stopped, after that
> everything works fine and fast. FYI, I do not use any code in the
> Application_Start event, so that can't be the problem.
>
> Anyone got an idea, am I doing something wrong perhaps with the compiler
> tool?
>
> Greetings,
> Chris
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
 
 
 
Chris Zopers
Guest
Posts: n/a
 
      06-23-2008
Okey, so not using the compiler tool would mean that on the first visit
the site will be compiled to IL and after that to machine language (two
times compiling) and using the compiler tool would mean that the first
compiliation (into IL) does not have to take place anymore? Am I getting
this right? So using the compiler tool would improve the startup time a
bit by eliminating the compilation into IL?

Greetings,
Chris




*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Madhur
Guest
Posts: n/a
 
      06-23-2008
You may try doing the NGEN to obtain the machine code beforehand.

--
Madhur

"Chris Zopers" <> wrote in message
news:...
> Okey, so not using the compiler tool would mean that on the first visit
> the site will be compiled to IL and after that to machine language (two
> times compiling) and using the compiler tool would mean that the first
> compiliation (into IL) does not have to take place anymore? Am I getting
> this right? So using the compiler tool would improve the startup time a
> bit by eliminating the compilation into IL?
>
> Greetings,
> Chris
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
BWC
Guest
Posts: n/a
 
      06-23-2008
That's correct.

You can control the delay you're experiencing with the JIT compiler, by
modifying the web.config setting for compilation. Setting batch="false" will
cause each page to be compiled individually as it is first requested - rather
than compiling a number of pages into machine specific binaries.

<compilation batch="false">

You can also configure the batch size, and other details.
http://msdn.microsoft.com/en-us/library/s10awwz0.aspx

Best of luck,
BWC

"Chris Zopers" wrote:

> Okey, so not using the compiler tool would mean that on the first visit
> the site will be compiled to IL and after that to machine language (two
> times compiling) and using the compiler tool would mean that the first
> compiliation (into IL) does not have to take place anymore? Am I getting
> this right? So using the compiler tool would improve the startup time a
> bit by eliminating the compilation into IL?
>
> Greetings,
> Chris
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
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
How to "jump the queue"...delay due to many thumbnail images Gary Hasler Javascript 12 02-19-2010 04:35 PM
How to due with "warning LNK4075: ignoring '/INCREMENTAL' due to Fresh C++ 2 04-22-2008 09:03 PM
Calculating propagation delay & transmission delay Stone Cisco 1 09-27-2006 06:26 PM
startup delay with desktop Steven Chipman Computer Support 2 10-29-2005 01:03 AM
Delay in thread startup? Tim Ward Java 1 10-16-2003 12:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57