且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更快地使用Web服务进行开放式winform

更新时间:2022-05-05 00:37:39

拳头,请看我对这个问题的评论。



现在,正如我所说的,更快启动应用程序真的很有意义。由于您没有提供任何有助于提高性能的信息(总体吞吐量,考虑到人为因素),因此如果客户端预先初始化的服务对象,您可以解决问题。你应该考虑过早地初始化它们。相反,您可以实施按需拨打策略:

http: //en.wikipedia.org/wiki/Call_by_need [ ^ ]。



基本上,您应该使用空引用保留服务集,并且仅在您要对每个服务执行第一次调用时初始化它们。他们。检查是否为null,如果为null,则执行初始化。



-SA
Fist, please see my comment to the question.

Now, as I say, it really may make sense to startup the application sooner. As you did not provide any information useful to help you to improve performance (overall throughput, taking into account the human factor), you can address the problem if pre-initialized service objects on the client side. You should think about initialization of them prematurely. Instead, you can implement the call-by-need strategy:
http://en.wikipedia.org/wiki/Call_by_need[^].

Basically, you should keep the set of services with null references, and initialize them only when you are about to perform the very first call to each of them. Check for null, and if it is null, perform initialization.

—SA