服务主机效率
希望你能帮助我..
我在我的程序中使用WCF。其中一部分包括使用 netNamedTypeBinding 在自助服务类型场景中使用 ServiceHost。当我在类中包含 ServiceHost 并实例化该类(此时 ServiceHost 设置为 null)时,内存使用量增加了大约 9Mb。如果我注释掉 ServiceHost 属性,内存不会跳转。
这是 ServiceHost 使用的相当旧的内存块。有没有办法减少这个问题,或者有一个更精简的 ServiceHost 版本吗?出于绝望而询问,因为我需要我的程序尽可能提高内存效率。
非常感谢您抽出时间
Hoping you could help me please..
I am using WCF in my program. Part of this includes using ServiceHost in a self-service type scenario using a netNamedTypeBinding. When I include ServiceHost in my class and then instantiate that class (ServiceHost is set to null at this point), the memory usage increases by approx 9Mb. If I comment out the ServiceHost attribute the memory doesnt jump.
This is a fair old chunk of memory being used by ServiceHost. Is there anyway to cut this down or is there a version of ServiceHost that is leaner? Asking out of desperation really as I need to my my program as memory efficient as possible.
Many thanks for your time
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直接回答:不,可能不会。你正在引入一个相当大的图书馆,你只需要付出代价。
但有几点:
Direct answer: No probably not. You are pulling in a sizable library and you'll just have to pay the price.
But a couple of points: