For those of you coding windows Application under the framework you must
noticed that forms take a performance hit loading the first time. This is
because of JIT, I was able to fix this behavior by using ngen.exe, but then
I don't get the same optimization JIT gives me and it is a headache for
installations (negen has to be called right after the installation).



According to Microsoft, a function gets JIT to native code the first time it
is accessed. Is it possible to tell the framework to JIT certain functions
at runtime without actually calling the functions?



Basically, I would like to pre-JIT some of my functions so they don't
experience a performance hit the first time they are called.



Is this possible?

Re: JIT by Gabriele

Gabriele
Mon Aug 11 07:24:22 CDT 2003

Mike,

Have you considered using NGEN.EXE? This utility creates a native image from
a managed assembly. You could put your functions in a separate DLL, and use
this utility to pre-JIT your code.

See the NGEN.EXE documentation in the .NET Framework SDK Documentation for
more details.

Gabriele

"Mike Peretz" <m_peretz@sympatico.ca> wrote in message
news:RiBZa.1004$Z03.118769@news20.bellglobal.com...
> For those of you coding windows Application under the framework you must
> noticed that forms take a performance hit loading the first time. This is
> because of JIT, I was able to fix this behavior by using ngen.exe, but
then
> I don't get the same optimization JIT gives me and it is a headache for
> installations (negen has to be called right after the installation).
>
>
>
> According to Microsoft, a function gets JIT to native code the first time
it
> is accessed. Is it possible to tell the framework to JIT certain functions
> at runtime without actually calling the functions?
>
>
>
> Basically, I would like to pre-JIT some of my functions so they don't
> experience a performance hit the first time they are called.
>
>
>
> Is this possible?
>
>
>
>



Re: JIT by Mike

Mike
Tue Aug 12 07:06:46 CDT 2003

Yes I know about negen.exe

I rahter use JIT, it has better optimization - but I want to control JIT at
run time.

"Gabriele G. Ponti" <ggponti@hotmail.com> wrote in message
news:u1HABOAYDHA.2424@TK2MSFTNGP12.phx.gbl...
> Mike,
>
> Have you considered using NGEN.EXE? This utility creates a native image
from
> a managed assembly. You could put your functions in a separate DLL, and
use
> this utility to pre-JIT your code.
>
> See the NGEN.EXE documentation in the .NET Framework SDK Documentation for
> more details.
>
> Gabriele
>
> "Mike Peretz" <m_peretz@sympatico.ca> wrote in message
> news:RiBZa.1004$Z03.118769@news20.bellglobal.com...
> > For those of you coding windows Application under the framework you must
> > noticed that forms take a performance hit loading the first time. This
is
> > because of JIT, I was able to fix this behavior by using ngen.exe, but
> then
> > I don't get the same optimization JIT gives me and it is a headache for
> > installations (negen has to be called right after the installation).
> >
> >
> >
> > According to Microsoft, a function gets JIT to native code the first
time
> it
> > is accessed. Is it possible to tell the framework to JIT certain
functions
> > at runtime without actually calling the functions?
> >
> >
> >
> > Basically, I would like to pre-JIT some of my functions so they don't
> > experience a performance hit the first time they are called.
> >
> >
> >
> > Is this possible?
> >
> >
> >
> >
>
>