|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Why a little slow in startup of .Net applicationsI 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. 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 -- Show quoteSashidhar 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. > > Sashidhar Kokku wrote:
> I dont think the assembly loading itself into the system cache is the same as mmm, I'm not sure that will affect load time. GAC basically allows you > the assembly loading into the GAC. > > If you want the assembly to be loaded fast, you should load it into the GAC. 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 Hi,
You have taken my question in right way, Can you have any solution? Show quote "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 > Hi,
I think you misunderstand the question, my doubt was Why a little slow in startup of .Net applications. Show quote "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. > > > > |
|||||||||||||||||||||||