just-in-time compiler

T

Tony Johansson

Hello!

The JIT compiler is compiling the IL code to native code.
I assume that this native code file is saved so the JIT compiler don't have
to recompile the IL code every time.
If it is saved where is is saved.
Is it saved to disk or is it saved in memory ?

//Tony
 
J

James A. Fortune

Hello!

The JIT compiler is compiling the IL code to native code.
I assume that this native code file is saved so the JIT compiler don't have
to recompile the IL code every time.
If it is saved where is is saved.
Is it saved to disk or is it saved in memory ?

//Tony

From page 10 of the book:

CLR via C#, Third Edition
Jeffery Richter
Microsoft Press, 2010
Library of Congress Control Number: 2009943026

MSCorEE.dll allocates a block of memory and saves the native CPU
instructions resulting from the compilation of the IL into that
block. Then it modifies the method's entry in the Type's table so
that it now points to that memory block for subsequent calls. The
same information was also in his earlier CLR book that didn't
emphasize C#.

James A. Fortune
(e-mail address removed)
 
A

Arne Vajhøj

The JIT compiler is compiling the IL code to native code.
I assume that this native code file is saved so the JIT compiler don't have
to recompile the IL code every time.

No.

It JIT compile every time the program is run.
If it is saved where is is saved.
Is it saved to disk or is it saved in memory ?

In memory.

Arne
 
T

Tony Johansson

Arne Vajhøj said:
No.

It JIT compile every time the program is run.


In memory.

Arne

If we have three pages callad A.aspx, B.aspx and C.aspx
Assume we start with A.aspx then the JIT compiler will compile this page
then we redirect to B.aspx now the JIT compiler will compile the B page. If
we now redirect to A.aspx I assume that this A.aspx will not be JIT compiled
again because
this page is cached in memory as you explained.
When the session is closed for a client all cached pages for this client is
removed from memory.

Is this correct understood ?

//Tony
 
A

Arne Vajhøj

If we have three pages callad A.aspx, B.aspx and C.aspx
Assume we start with A.aspx then the JIT compiler will compile this page
then we redirect to B.aspx now the JIT compiler will compile the B page. If
we now redirect to A.aspx I assume that this A.aspx will not be JIT compiled
again because
this page is cached in memory as you explained.
Correct.

When the session is closed for a client all cached pages for this client is
removed from memory.

No.

Pages are not associated with the session - they are associated with the
application.

They will stay cached in memory until the app is restarted (app pool
recycled in ASP.NET terminology).

This happen scheduled typical every 12 hours or in case of certain
problems or at request.

Arne
 
T

Tony Johansson

Arne Vajhøj said:
No.

Pages are not associated with the session - they are associated with the
application.

They will stay cached in memory until the app is restarted (app pool
recycled in ASP.NET terminology).

This happen scheduled typical every 12 hours or in case of certain
problems or at request.

Arne

When you say
They will stay cached in memory until the app is restarted (app pool
recycled in ASP.NET terminology).
does this mean all pages cached on the web server and is it the same as
restart the IIS ?

//Tony
 
T

Tony Johansson

Tony Johansson said:
When you say
They will stay cached in memory until the app is restarted (app pool
recycled in ASP.NET terminology).
does this mean all pages cached on the web server and is it the same as
restart the IIS ?

//Tony

Assume you use IIS 6.0 and you have two application pools will you then have
one or two
W3wp.exe ?

//Tony
 
A

Arne Vajhøj

When you say
They will stay cached in memory until the app is restarted (app pool
recycled in ASP.NET terminology).
does this mean all pages cached on the web server and is it the same as
restart the IIS ?

ASP.NET will keep the output from JIT compilation in memory until
the app is restarted.

Restarting IIS is one way to restart the app. But ASP.NET also
does it every 12 hours. And I believe it also happens if web.config
is changed. There are some rules - and I am not an expert in them.

Arne
 
A

Arne Vajhøj

Assume you use IIS 6.0 and you have two application pools will you then have
one or two
W3wp.exe ?

I am not an expert in IIS and ASP.NET config.

But I believe that two app pools will mean two processes
both running W3WP.EXE (the same executable).

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top