WCF-响应速度慢 [英] WCF - Slow first response

查看:93
本文介绍了WCF-响应速度慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


推荐答案

强烈建议避免在服务器端应用程序中使用NGEN.

这不仅与JIT-ting有关.在首次呼叫期间,WCF还会初始化整个基础结构并将配置应用于您的服务.
但是反正我觉得3分钟实在太多了.您是否尝试过将WCF服务托管在控制台应用程序中,并衡量将服务实例化为内部的ServiceHost需要花费多少时间?此外,如果是自托管WCF服务,还请检查完成首次呼叫需要多少时间.问题可能出在您的代码中.
It's highly recommended to avoid using NGEN for server side applications.

It's not only about the JIT-ting. During first call WCF also initializes the whole infrastructure and applies configuration to your service.
But anyway 3 minutes looks too much as per me. Have you tried to host your WCF service in console application and measure how much time it takes to instantiate ServiceHost with your service inside? And also check how much time it takes to complete first call in case of self hosted WCF service. The problem could reside in your code.


这篇关于WCF-响应速度慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆