Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / October 2004

Tip: Looking for answers? Try searching our database.

Is the cached code is stored on permanent storage for future use

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hitesh - 25 Oct 2004 15:43 GMT
Hi,
I have a big confusion with me that if we have a windows application
executable built using C#.NET and when we execute it for the first time the
following things happens:
1. clr calls JIT to convert MSIL to native.
2. native code is cached and when next time same code comes into picture
during execution it gets loaded from the cache instead of getting JITed again.

Now my question is:
1. Is that cached code is there as long as the executable is up and running
or it will be there for always so that when you shuts down your system for
today and then come tommorow and boots up your system fresh and tries to
execute the same executable, then what happens?

Is the cached code is used that was cached yesterday?
or the same process of JITing and caching takes place again

Signature

Thanks
Hitesh

Mattias Sj?gren - 25 Oct 2004 16:59 GMT
>1. Is that cached code is there as long as the executable is up and running
>or it will be there for always so that when you shuts down your system for
>today and then come tommorow and boots up your system fresh and tries to
>execute the same executable, then what happens?

The native code is only stored in memory, and it's lost when the
process terminates. The code will be re-jitted every time you execute
the application.

If you want to store native code on disk you should look into the
Ngen.exe tool.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Hitesh - 25 Oct 2004 17:21 GMT
Hi Mattias,

Thanks for your answer now i am more comfortable with .NET than earlier.

Thanks and Regards
Hitesh Jain

"Mattias Sjögren" wrote:

> >1. Is that cached code is there as long as the executable is up and running
> >or it will be there for always so that when you shuts down your system for
[quoted text clipped - 9 lines]
>
> Mattias
Richard Blewett [DevelopMentor] - 25 Oct 2004 17:25 GMT
By default, the IL is JIT'd every time the process is run (it is only cached in memory). There is a tool called NGEN.EXE which will compile the code on the deployed machine and cache the image in an area of the GAC called the native cache. However, not all types of applications benefit from being NGEN'd so it is best to test you particular application.

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

  Hi,
I have a big confusion with me that if we have a windows application
executable built using C#.NET and when we execute it for the first time the
following things happens:
1. clr calls JIT to convert MSIL to native.
2. native code is cached and when next time same code comes into picture
during execution it gets loaded from the cache instead of getting JITed again.

Now my question is:
1. Is that cached code is there as long as the executable is up and running
or it will be there for always so that when you shuts down your system for
today and then come tommorow and boots up your system fresh and tries to
execute the same executable, then what happens?

Is the cached code is used that was cached yesterday?
or the same process of JITing and caching takes place again

--
Thanks
Hitesh

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.