ASMX 在“生成序列化程序集”后仍然很慢

发布于 2024-09-04 00:02:11 字数 354 浏览 2 评论 0原文

此问题与:ASMX Web 服务第一个请求缓慢有关。

我继承了旧版 ASMX 服务的代理。基本上正如上面的帖子所述,第一次调用性能实际上比后续调用慢 10 倍。我继续在包含代理的项目上打开“生成序列化程序集”。 “序列化器”程序集实际上已生成。然而,我根本没有看到任何性能提升。除了确保“序列化器”程序集位于客户端的 bin 目录中之外,我还需要执行其他操作吗?我是否必须在代理生成期间将代理“链接”到“序列化器”程序集(wsdl.exe)?我想我现在被困住了。 J·桑德斯 你在哪里? :)

This question is related to: ASMX Web Service slow first request.

I inherited a proxy to a legacy ASMX Service. Basically as the post above states, the first call performance is literally 10 times slower than the subsequent calls. I went ahead and turned on ‘Generate serialization assembly' on the project that contains the proxy. The 'serializers' assembly is actually generated. However, I haven't seen any performance increase at all. Do I need to do anything else other than make sure the 'serializers' assembly is in the client's bin directory? Do I have to 'link' the proxy to the 'serializers' assembly during proxy generation (wsdl.exe)? I guess I'm stuck at this point. J Saunders where u at? :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

李白 2024-09-11 00:02:11

实际上,启动时间不仅仅是创建序列化程序集。创建 AppDomain、JIT 所有方法、解析配置文件等都可能需要相当多的时间。

您实际上并没有说“10 次”实际上是多少,但根据我的经验,第一个请求 10-15 秒并不罕见。

如果您运行的是 Windows Server 2008,您可以尝试应用程序预热,这基本上只是一个在IIS工作进程回收、服务器重启等情况下自动发出页面请求的工具。但自己编写这样的脚本并不难,真的,正如 code4life 所说(应用程序预热的功能使其比“手动”更好一些,但根据我的经验,手动方式仍然相当有效)。

There is actually a lot more to start up time than just creating the serialisation assemblies. Creating the AppDomain, JITing all of the methods, parsing config files and so on can all take quite a bit of time.

You don't actually say how much "10 times" actually is, but 10-15 seconds for the very first request is not unusual in my experience.

If you're running Windows Server 2008, you can try Application Warm-Up which is basically just a tool that automatically makes requests for pages when the IIS worker process is recycled, or the server is rebooted and so on. But it's not hard to write such a script yourself, really, as code4life says (Application Warm-Up has features which make it work a bit better than what you can do "manually", but the manual way is still quite effective in my experience).

岁月流歌 2024-09-11 00:02:11

我认为您真正的问题与网络服务的每日重新加载有关。是否可以安装一个重启后批处理脚本来首次调用服务器的 Web 服务?这是我们在之前的一份合同中必须做的事情,它确实带来了很大的不同。

I think your real problem has to do with the daily reloading of the web service. Is it possible to install a post-reboot batch script that makes the first call to the web service to the server? This is what we had to do in one of my previous contracts, and it really made all the difference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文