Compilation

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi,
I wrote a c# application (dll) and i use it in my project, but every time i
compile and run my project it take a long time to start running, i guss it
becuse the jits compilers.

How can i config my c# application that after i first compile it it will not
compile again in run time (on the same computer)???

Thanks.
 
I'm not to sure I understand your problem, but if you mean that you don't want your dll to be built again, or you only want a specific project built, right-click the project in the solution explorer and select Build. This way you can build one project at a time.
 
Hi Dave,
I wrote a c# application (dll) and i use it in my project, but every time i
compile and run my project it take a long time to start running, i guss it
becuse the jits compilers.

How can i config my c# application that after i first compile it it will not
compile again in run time (on the same computer)???

If you are starting from the debugger there is always some amount of lag
before the project launches. This lag time increases the more assemblies
you reference. It gets dramatically longer (and debugging itself becomes
more sluggish) if you have unmanaged debugging turned on in the startup
project's properties. That should be off by default for a C# project and
you should generally only turn it on if you know you're going to need it.

If you're not talking about starting from the debugger but just about the
load time in general then perhaps you're noticing the time it takes to load
the .NET Framework when the first assembly is referenced. It's possible,
although somewhat unlikely, that it's the JIT compilation of your assembly
that is to blame, as you suggest above. While it's true that assemblies are
JIT compiled each time they are loaded, in most cases this overhead is not
noticeable.

If you want to experiment with pre-JIT compiling your assembly or some part
of it, then please read the documentation for the .NET Native Image
Generator (NGEN.EXE) in the .NET Framework SDK Documentation and see if it
is something that would make sense for you to use. While using NGen is an
option, few people find that they need it.

Hope that helps,
Nick Cipollone
 
Back
Top