Well, like I said, the slow response upon the first request is just part
of how ASP.NET works. I see it as the cost of doing business. The JIting
is a small part of that, but only happens once ever (assuming the pages don't
change) whereas the cost of starting the AppDomain ocurrs every time the
app starts.
As far as ngen, the downsides, IMO, outweigh the upsides. It's an extra step
to perform. Once an assembly is ngen'd, the code is very brittle -- if any
assembly in the dependency tree is changed, then the entire ngen tree is
invalidated and the JITter kicks back in as normal ignoring the ngen'd assemblies.
This makes updating a single assembly more difficult. Also, when using ngen,
you now have two images of your assembly loaded -- the NGen'd one (with the
x86) but you also need to load the original one, since that's where all the
metadata is. Lastly, with the x86 code you're guarenteed the entire things
is loaded, whereas with JITing only the code you call is actually JIT'd.
NGEN was originally intended to avoid the lag one *might* see with windows
forms apps starting due to the JITing. Too often people assumed it was JITing
that was causing their app to be slow -- they would often overlook the numerous
DB round trips as a possible performance problem. ;)
NGEN in 2.0 does get better, but I'm still not convinced it's worth it for
for server based apps like ASP.NET.
-Brock
DevelopMentor
http://staff.develop.com/ballen I haven't implemented any particular methodology yet myself but I have
seen many articles and proposed solutions such as a control that
pinged the server to keep the application state refreshed. What aspect
of ngen has proven fallible? What solution(s) have you found
meritorious?
<%= Clinton Gallagher
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:10***********************@msnews.microsoft.co m...
ngen is a red herring -- Kevin was correct in that the majority of
time is the application starting (not the page compilation).
-Brock
DevelopMentor
http://staff.develop.com/ballen Maybe ngen [1] huh? There's many articles that can be found
discussing what has been learned about maximizing ASP.NET
performance.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
[1]
http://msdn.microsoft.com/library/de...rary/en-us/cpt
oo
ls/html/cpgrfnativeimagegeneratorngenexe.asp
"Terry Olsen" <to******@hotmail.com> wrote in message
news:eB*************@TK2MSFTNGP09.phx.gbl...
Is there any way to make my aspx pages appear faster on the first
hit? When browse to a page I have on my local server, I watch the
server's hard drive light chug away for a good 20-30 seconds before
anything appears in my browser. I would be surprised if I'm not
having some would-be web site visitor move on thinking the site is
dead.
Once the first hit has activated the site, it all responds fairly
quickly...that is until the next time the site has been idle for a
while...