473,322 Members | 1,719 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,322 software developers and data experts.

MSDNMag Article re Ngen - does it apply?!

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
Apr 18 '06 #1
7 1465
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

--
http://www.openmymind.net/

"musosdev" <mu*******@community.nospam> wrote in message
news:FA**********************************@microsof t.com...
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

Apr 18 '06 #2
That's great Karl - how do I turn it on!? :o)

"Karl Seguin [MVP]" wrote:
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

--
http://www.openmymind.net/

"musosdev" <mu*******@community.nospam> wrote in message
news:FA**********************************@microsof t.com...
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


Apr 18 '06 #3
I find the web deployment project quite useful for this:
http://msdn.microsoft.com/asp.net/re...structure/wdp/

That doesn't work for Express. There's a free program out there that does
work with Express...let me know if you need it, I'll dig it up (I have it at
home...)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"musosdev" <mu*******@community.nospam> wrote in message
news:63**********************************@microsof t.com...
That's great Karl - how do I turn it on!? :o)

"Karl Seguin [MVP]" wrote:
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

--
http://www.openmymind.net/

"musosdev" <mu*******@community.nospam> wrote in message
news:FA**********************************@microsof t.com...
> 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


Apr 18 '06 #4
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.

Apr 19 '06 #5
And here's the link to the (free) standalone compiler for express users:
http://www.west-wind.com/tools/aspnetcompiler.asp

Karl
--
http://www.openmymind.net/

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:y5**************@TK2MSFTNGXA01.phx.gbl...
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.

Apr 19 '06 #6
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.

"Karl Seguin [MVP]" wrote:
And here's the link to the (free) standalone compiler for express users:
http://www.west-wind.com/tools/aspnetcompiler.asp

Karl
--
http://www.openmymind.net/

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:y5**************@TK2MSFTNGXA01.phx.gbl...
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.


Apr 21 '06 #7
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.)

Apr 24 '06 #8

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

Similar topics

3
by: William Reyes | last post by:
I have a question regarding the use of ngen.exe and dedployment. I want to make sure I understand this correctly. If I create an app that has an .exe as well as a couple of .dll's. I can create...
2
by: Wol | last post by:
I have two assemblies, A.dll and B.dll. A.dll contains two methods. One method, UsesB, uses a type from B.dll whereas the other, DoesNotUseB, does not. To cache a native image of A.dll with...
1
by: Will | last post by:
Hi All, * I have 2 dev machines, one is running WinXP Pro and one is running Win2K Server. Each has Visual Studio .NET 7.0 installed (the .NET 1.0 dev tools.) * I have a .NET .dll (let's call...
1
by: Chua Wen Ching | last post by:
Hi, How do i achieve this? I extracted this from the internet. Tools that compile your .NET code to native x86 code using the "ngen" facility of the .NET runtime (essentially "pre-jitting"...
2
by: JMMB | last post by:
Just a confirmation. NGen generates native code when i install the windows application on the client or when I run it for the first time? thanks,
3
by: Brian | last post by:
The Ngen documentations says that it installs a native image on the "local" computer. Does this mean that NGen needs to be run on each computer an app is deployed to or do you run NGen once on...
2
by: whezker | last post by:
Hi everybody. I'm trying to use the ngen tool from framework 2.0, to accelerate the load runtime of my app. I'll explain here what I'm doing. First I copy&paste the ngen.exe to the Bin folder of...
4
by: PSiegmann | last post by:
Hello, we have a small application on one server that does every 10 minutes (cronjob) some filetasks and very basic SQL queries against an installed SQL Server Express instance there. Does...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.