AFNotificationContactType attribute declaration slowing start of service or program by 25 seconds

Discussion created by Rafik.Rezine on May 30, 2011
Latest reply on May 31, 2011 by dtakara
I am currently developping a service that among other things connect to PI AF to read write data / objects.
I noticed that the service take too much time to start (most of the time not starting as its start period exceeds the Windows service timeout for starting services).

After some debugging, I found the instruction causing the slowness:

AFNotificationContactType myContactType = AFNotificationContactType.Individual;

This is an attribute decalration in the program's class. It adds 25s to the start of the service.

I created a simple C# application, to test this assumption.
When I comment the attribute declaration, the application starts in 2s.
When I uncomment the declaration, the application starts in 25s.

Is there any reason for this very simple attribute decalaration to slow the program?