Using latest WcfFacility, Castle 2.5 release, first service takes 4 seconds
to register in container.
Is it known issue, by-design or "that's how things works"?

Consider next test:
[Test]
public void Calculator_timing()
{
var windsorContainer = new WindsorContainer()
.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero);

var stopwatch = new Stopwatch();
stopwatch.Start();

var registration = Component
.For<ICalculator>()
.ImplementedBy<Calculator>().LifeStyle.Transient
.Named("Operations")
.AsWcfService(new DefaultServiceModel().AddEndpoints(
WcfEndpoint
.BoundTo(new NetTcpBinding {PortSharingEnabled = true})
.At("net.tcp://localhost/Operations"))
);

Console.WriteLine("Component Created: " + stopwatch.ElapsedMilliseconds +"
ms");
windsorContainer.Register(registration);
Console.WriteLine("Component Registered: " + stopwatch.ElapsedMilliseconds +
" ms");
}

The output is:
 Component Created:    10 ms
 Component Registered: 4338 ms

If I'll register more components in container, it's only first registration
that takes so long.
Is facility doing something useful when registering first service?

PS: 4 seconds is almost nothing when running the app, but when running a
test suite it becomes more than noticeable...

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to