ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

.NET Application Startup Times

(1/3) > >>

Ralf Maximus:
General question for .NET experts...

Why do .NET applications (programs compiled using Visual Studio 2003 or newer) take so frikkin long to load?

And what the heck is with all the disk activity?  I have some very tiny utilities that take 15-20 seconds to start and run the disk drive like a defragger.  More complicated apps using a different compiler boot up faster.

So what's going on behind the scenes?  Or have I just been unlucky enough to stumble across a few unoptimized .NET apps?

tinjaw:
.NET is a common library, and a big one at that. So the first time you load an application that needs it it loads the whole thing. Every application you load after that should load quickly as they share. This is very similar to booting up the operating system as it loads all the drivers.

tinjaw:
Oh. And if you are curious, fire up Sysinternals/Microsoft Process Explorer. The default is to highlight all of the applications that are sharing the .NET framework. I'm packing up to leave work. Maybe somebody can post a screenie, otherwise I will try to post one when I get settled in at home tonight.

f0dder:
The first time you run a dotNET app after system bootup, you take a huge penalty for getting the dotNET subsystem started. After this, iirc, it stays loaded.

Also, the first time you run a dotNET app, regardles of whether you have the dotNET runtime loaded, you get some JITing penalty.

After that, it's not all that bad, although dotNET binaries are heavier than native code.

tinjaw:
Here are those screenies.

Program is Sysinternals' Process Explorer.

[attachimg=#1][/attachimg]
[attachthumb=#2][/attachthumb]

Navigation

[0] Message Index

[#] Next page

Go to full version