开发者

Microsoft PolicyInjection Create too slow

Our project is using PolicyInjection (from Microsoft EnterpriseLibrary) for some reason. Problem is, that PolicyInjection.Create(params) takes about 30 ms. This is WAY too much since it is called over 100 times for single request which 开发者_运维百科summs up in unaccapetable performance hit. Is there any solution to this problem? We are using EnterpriseLibary 4.1


Ok. So after a lot of investigation I came to conclusion that PolicyInjection simply really is very slow and should never be used in projects! We are going to switch over to PostSharp or simply get rid of PI. PI uses Unity in background for building proxy class. This is incredibly slow process. There are no caches so it is slow slow slow. PI Create can easily take 30 and more miliseconds. Only way to use it is if you are very sure that it won't get called more than few times (but even 30 calls will end up in 1 second).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜