Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2007

Tip: Looking for answers? Try searching our database.

Why a little slow in startup of .Net applications

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Umeshnath - 28 Mar 2007 00:53 GMT
I have experienced a little bit of a slow in when a .net application runs
first. But later it never happens until the system restarts.

I understood the reason is that when ever application runs first JIT
compiler recompiles the assembly and generate a native code that is fully
compatible to our current CPU specifications if the assembly doesn’t have a
native image in its cache. Later it uses from cache hence it executes fast.

My doubts comes here, when application runs first it generate native code
and added to cache then why I am not able to see using the below command

ngen display “Assmblyname” it gives me below error.

Error: The specified assembly is not installed.

Please give me a solution for this, also if I am wrong please correct me.
Günter Prossliner - 28 Mar 2007 09:34 GMT
Hi!

> I understood the reason is that when ever application runs first JIT
> compiler recompiles the assembly and generate a native code that is
> fully compatible to our current CPU specifications if the assembly
> doesn't have a native image in its cache. Later it uses from cache
> hence it executes fast.

From the CLR's point of view, the generation of native code happens "in
place". The JIT-Compiler compiles the IL in memory.

> My doubts comes here, when application runs first it generate native
> code and added to cache then why I am not able to see using the below
> command
>
> ngen display "Assmblyname" it gives me below error.

ngen has little to do with the JIT-Compiler. When you use "ngen", the
Compilation is done once, and the compiled native Code is saved within a
file.

You have to use the

ngen install "Assemblyname"

command for this.

After installing the native image, the JIT doens't need to be called by the
CLR at runtime, so executing the Assembly will be faster.

GP

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.