Groups | Blog | Home
all groups > dotnet component services > april 2005 >

dotnet component services : .NET Windows Service startup time (very slow)



Arnie
4/5/2005 2:33:42 PM
We think we have discovered a bug in .NET.

When we create a .NET windows service it take > 90 seconds at boot time to
startup the service, even when the service does nothing. After alot of
investigation and research we have discovered that if we make our service
depend on a number of other system services the problem goes away (for some
reason).

Samples, boot time stats & tools, can be provided if needed.

Has anyone else seen this or have insight here?

-jeff

Arnie
5/2/2005 12:06:46 PM
Okay here is the issue here...

One of my colleagues Ryan Columbus discovered that there is a significant
performance issue when using the process class in a service startup.

Create a new .NET service and put the following in the OnStart;

Process.GetCurrentProcess().ProcessName

Some logging will show the service takes ~1 min. 30. to start at bootup.
Without the call to process it takes < 1 second.

Any insights here?

-jeff
[quoted text, click to view]

AddThis Social Bookmark Button