0
new WindsorContainer()
需要4秒,有時7
我與DotTrace一些性能測試,發現問題是這種方法:
Castle.Windsor.Diagnostics.PerformanceMetricsFactory.Initialize()
它在最後這麼做:
Microsoft.Win32.RegistryKey.InternalGetValue(String, Object, Boolean, Boolean)
任何人都知道如何使它不這樣做,使構造函數會立即工作,而不是4秒?
可以,請你告訴我怎麼降級這一行: Container.Register(AllTypes.FromAssemblyNamed(a).Pick()。WithService.FirstInterface()。LifestylePerWebRequest())'v。2.5.1.0,.LifestylePerWebRequest()在此版本中不存在 – Omu
這個'Container.Register(AllTypes.FromAssemblyNamed(a).Pick()。WithService.FirstInterface()。Configure(o => o.LifeStyle.PerWebRequest))' – Omu