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.

RE: Why a little slow in startup of .Net applications by SashidharKokku

SashidharKokku
Tue Mar 27 18:16:53 CDT 2007

I dont think the assembly loading itself into the system cache is the same as
the assembly loading into the GAC.

If you want the assembly to be loaded fast, you should load it into the GAC.

HTH
--
Sashidhar Kokku
ikaSystems Corp


"Umeshnath" wrote:

>
> 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.
>
>

Re: Why a little slow in startup of .Net applications by James

James
Tue Mar 27 20:14:34 CDT 2007

Sashidhar Kokku wrote:
> I dont think the assembly loading itself into the system cache is the same as
> the assembly loading into the GAC.
>
> If you want the assembly to be loaded fast, you should load it into the GAC.

mmm, I'm not sure that will affect load time. GAC basically allows you
to install assemblies that will be shared by multiple other
assemblies/applications... Putting an assembly in the GAC won't cause it
to be loaded at system startup or cached in any other way... What the OP
was talking about was JIT compilation which is more likely the cause of
the slowdown.

Best Regards,

James Crosswell
Microforge.net LLC
http://www.microforge.net

RE: Why a little slow in startup of .Net applications by Umeshnath

Umeshnath
Wed Mar 28 03:34:01 CDT 2007

Hi,
I think you misunderstand the question, my doubt was Why a little slow in
startup of .Net applications.


"Sashidhar Kokku" wrote:

> I dont think the assembly loading itself into the system cache is the same as
> the assembly loading into the GAC.
>
> If you want the assembly to be loaded fast, you should load it into the GAC.
>
> HTH
> --
> Sashidhar Kokku
> ikaSystems Corp
>
>
> "Umeshnath" wrote:
>
> >
> > 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.
> >
> >

Re: Why a little slow in startup of .Net applications by Umeshnath

Umeshnath
Wed Mar 28 03:36:03 CDT 2007


Hi,
You have taken my question in right way, Can you have any solution?


"James Crosswell" wrote:

> Sashidhar Kokku wrote:
> > I dont think the assembly loading itself into the system cache is the same as
> > the assembly loading into the GAC.
> >
> > If you want the assembly to be loaded fast, you should load it into the GAC.
>
> mmm, I'm not sure that will affect load time. GAC basically allows you
> to install assemblies that will be shared by multiple other
> assemblies/applications... Putting an assembly in the GAC won't cause it
> to be loaded at system startup or cached in any other way... What the OP
> was talking about was JIT compilation which is more likely the cause of
> the slowdown.
>
> Best Regards,
>
> James Crosswell
> Microforge.net LLC
> http://www.microforge.net
>