Was this different from other version? When I run WCFFacility Unit Tests and
see similar 4 sec when running net-tcp test for first time. Subsequents runs
take ~ 15-20 ms. I actually used VS 2010 Profiler (for first time) to check
whats going on and almost all the time was in the ServiceHost.Open call
On Aug 25, 2010, at 9:30 AM, Valeriu Caraulean wrote:
> 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.
--
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.