我正在一个网站上进行代码审查,这个网站会有很多并发用户, 100,000个已认证的用户。Ninject和性能
我发现型的下面的代码:
[Inject]
public BusinessLayer.ILoginManager LoginManager { get; set; }
而在的global.asax.cs:
protected Ninject.IKernel CreateKernel()
{
return new StandardKernel(new ServiceModule());
}
internal class ServiceModule : NinjectModule
{
public override void Load()
{
Kernel.Bind<IReportProxy>().To<ReportProxy>().InRequestScope();
}
}
问题是:利用Ninject会影响性能?由于演出情况,您是否有使用Ninject的情况?
确实如此,但都有不同的API和功能集。考虑根据API等多种因素作出决策,支持目标生命周期(例如,每个Web请求在Web应用程序中都很好),针对目标使用的性能,许可等等。 – Philippe 2013-03-07 14:35:16