The first loading .Net 3.5 DLLs is slow
-
Wednesday, November 18, 2009 8:14 AMI have an application which used .Net 3.5 however it is slow to load these .Net 3.5 DLLs. After I close my application and restart it it is faster than the first loading. Tricky.
// The following is these .Net DLLs which we want to load.
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\msvcr80.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\7124a40b9998f7b63c86bd1a2125ce26\mscorlib.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\system32\rsaenh.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\3de5bd01124463d7862bd173af90bc83\System.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\WindowsBase\204d6e5b335134f23ca37638b9227ecf\WindowsBase.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationCore\94badbd64df59de7da249f71da38b1c2\PresentationCore.ni.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\58c7ac6b6054038dc9346d7ec8e32b4c\PresentationFramework.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\Microsoft.NET\Framework\v3.0\WPF\wpfgfx_v0300.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\7c743462baccf29b3567b0e3ec9ac134\System.Configuration.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\5913d3f81e77194ec833991b1047a532\System.Xml.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\system32\d3d9.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\system32\d3d8thk.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\system32\WindowsCodecs.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\system32\dciman32.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\3bb4d16b042b72c2c85a0f8ac9d48f28\PresentationFramework.Luna.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\system32\wtsapi32.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\system32\winsta.dll', Symbols loaded (source information stripped).
'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\30c5c2682d3c5bdaa83bb9a36ee48afa\PresentationFramework.Aero.ni.dll', No native symbols in symbol file.
'C:\WINDOWS\system32\PresentationNative_v0300.dll', Symbols loaded (source information stripped).
All Replies
-
Wednesday, November 18, 2009 8:26 AMAre you loading through reflection or adding a reference.
If the time difference is too much, you can use ngen.exe to create a native image of the dll, this would save the first delay in loading. however, you would be missing out on JITs optimization where it generates native code optimized for the platfom its running on.
I would always recommend JIT compilation inspite of the minor delay.
Ganesh Ranganathan
[Please mark the post as answer if it answers your question]
blog.ganeshzone.net- Marked As Answer by eryangModerator Tuesday, November 24, 2009 10:46 AM
- Unmarked As Answer by Karel ZikmundMicrosoft Employee, Moderator Tuesday, November 24, 2009 4:39 PM
-
Friday, November 20, 2009 1:23 AMModerator
What is your question?
You just stated a natural fact: The first run (so called 'cold starup') is slower than subsequent runs ('warm startup'). That applies to every application (even native C++ applications).
Do you want to improve cold startup of your application? If yes, what is the current time it takes to run your app (cold vs. warm startup) and what is the time you would expect?
Note that JIT doesn't have any impact on the difference between cold and warm startup.
-Karel- Marked As Answer by eryangModerator Tuesday, November 24, 2009 10:46 AM
-
Monday, November 23, 2009 7:29 AMModeratorHi whtank,
It is long time since the last reply, did you get useful information from above suggestions, or you still have any concern about this issue? Please let us know.
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help.

