473,395 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Startup delay due to compiling

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 ***
Jun 27 '08 #1
4 1377
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" <te***********@12move.nlwrote in message
news:eY**************@TK2MSFTNGP05.phx.gbl...
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 ***
Jun 27 '08 #2
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 ***
Jun 27 '08 #3
You may try doing the NGEN to obtain the machine code beforehand.

--
Madhur

"Chris Zopers" <te***********@12move.nlwrote in message
news:Ox**************@TK2MSFTNGP02.phx.gbl...
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 ***
Jun 27 '08 #4
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 ***
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Neil Benn | last post by:
Hello, I'm looking at a small app which would need a very quick startup time for the Python interpreter. It doesn't do much (copying and caching of files, no GUI) but I need the Python...
1
by: John Smith | last post by:
Hello! I have following developing environment: Visual Studio.NET 2003 ..NET Framework 1.1 local ASPNET account exists Windows XP Professional All worked perfectly for months.
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
8
by: Macgyver | last post by:
Hi all, does anyone know how to generate a millisecond delay in C, compiling under Linux? I understand the function sleep() will generate a delay down to a resolution of one second, but I need...
10
by: Kristoffer Arfvidson | last post by:
In my server I notice a small delay of about 2 seconds before it starts processing aspx documents... Because I have first off an standard asp page, witch contains the frameset and title and so...
5
by: Henry C. Wu | last post by:
Hi, I'm trying to implement a way to security check the Hash of the Application.ExecutablePath. I placed the following ran the ff procedure at Sub Main Private Sub CheckHash() Dim fs As New...
9
by: jeff | last post by:
Hi All. I realize that when my Deployed winforms application starts, Windows needs to load the .net 2 framework before control is given to my application.... Is there anyway to either ... -...
0
by: Oleg.Ogurok | last post by:
Hi there, I have a small console app that makes a call to XML Webservices. The app runs from a login script. Because of the web service call, it takes about 15-20 seconds for the app to...
10
by: kimiraikkonen | last post by:
Hi there, I figured out, for the first execution for any .NET-powered app such as VB.NET or C#, it takes 7-8 seconds to see main form of "any" application even the application consists of a single...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.