MSDNMag Article re Ngen - does it apply?!

G

Guest

Hi guys

I've just read the article in this months MSDN about using Ngen to speed up
initial load times and I thought "great, I can speed up initial load of my
web app!".

However, having just read the conversation between Steven Cheng and MLibby
on this group (search for "ngen" to find it) - I'm thinking my plan is
scuppered. Then again, that's 2004.

So, with VS2005, is there any point in using Ngen on a web app!? It's an
intranet situation, so it will only ever be loading applications we put
there, but will using Ngen make any difference to loading times for our users?

Or, is there another solution (like writing a system to periodically load
pages so that the compiled code is kept in memory?)

I'd appreciate any clarification you can give on this :)

Cheers


Dan
 
K

Karl Seguin [MVP]

One of the new compilation models in 2005 is to precompile everything -
including the aspx/ascx/asmx which used to be JITted. With this model,
first-time load isn't an issue.

Karl
 
G

Guest

That's great Karl - how do I turn it on!? :eek:)

Karl Seguin said:
One of the new compilation models in 2005 is to precompile everything -
including the aspx/ascx/asmx which used to be JITted. With this model,
first-time load isn't an issue.

Karl
 
S

Steven Cheng[MSFT]

Thanks for Karl's informative input.

Hi Dan,

Regarding on the ASP.NET application, it utilize dynamic compilation and
the dynamic compiled assembly (in temporary folder) is changable. So for
such case, it is not recommended to use NGEN to pre-jit the application
assemblies. I agree to Karl's idea on use the precompilation of ASP.NET 2.0
to pregenerate the dynamic assemlies for ASP.NET 2.0 application(note, the
pregenerated ones are managed assemblies rather than unmanaged assembly
produced by NGEN). This can also speedup startup performance for ASP.NET
very much.

And for precompilation, ASP.NET 2.0/vs 2005 provide built-in feature to
support this, in VS 2005 , you can use the "Publish Web Site" function to
precompile the complete website application. Or you can use the .net 2.0's
commandline utility "aspnet_compiler.exe" to do the same work.

#ASP.NET Compilation Tool (Aspnet_compiler.exe)
http://msdn2.microsoft.com/en-us/library/ms229863.aspx

And as for the "Web Deployment Project" Karl mentioned, it's an additional
add-on project the ASP.NET dev team provide us to let us do more
customization on the precompilation.

Hope this also helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

wow - thanks for all the info guys!

i dont think the publish option is viable - its going onto a clients win2k3
server which i dont believe is setup for me to be able to do that.

definently gonna set this up somehow though, thanks again.
 
S

Steven Cheng[MSFT]

You're welcome Dan,

Please feel free to post here when there is anything else we can help.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top