Groups | Blog | Home
all groups > dotnet performance > december 2004 >

dotnet performance : Assembly.LoadFrom and machine restart


sunil NO[at]SPAM volcanomail.com
12/23/2004 6:13:02 AM
Dear All,
I have developed a client .net application that gets launched via
No Touch Deployment...using the Assembly.LoadForm method...I have a
dll xrt.dll for which I have not maintained versioning...
When I launch my application after a machine reboot (xrt.dll already
present on client machine) it takes 2 seconds to load this dll...I
assume this is because I have not maintained versioning of this dll
and hence it downloads this dll again...but if I close my application
and start it again, this dll gets loaded in 300ms seconds...how come
it is fast the second time? My guess is it should have still taken 2
seconds...can someone explain wot is MS doing here...
I swear the following...:-)
1. xrt.dll was not changed in the server.
2. xrt.dll was already present on the client machine. (I ran the
application once and then restarted my client machine).

Please help...I want to enjoy my X'Mas...:-)

TALIA
Many Regards
Chris, Master of All Things Insignificant
12/23/2004 1:49:10 PM
The first time the dll is run on the machine the JIT Compiler compiles the
dll. The second time your run it, it is already compiled; it looks to see
that a new version doesn't exist first. Whenever you restart the dll have to
be recompiled. There is a way to "pre-compile" the .net dll on that
machine, but I don't remember the name of the exe to do it.

Chris

[quoted text, click to view]

Michael Pearson
12/27/2004 4:05:03 PM
ngen to "pre-compile"

Michael
[quoted text, click to view]

Sherif ElMetainy
1/4/2005 8:38:25 PM
Hello

Most probably your assembly is cached in memory by windows the first time,
and in the later runs, it is loaded from memory. You can try this any
application (Outlook for example) and watch the hard disk led if first and
second run, you will notice a difference.

Best regards,
Sherif

[quoted text, click to view]

AddThis Social Bookmark Button