有没有办法估计 .net 远程处理的剩余时间?

发布于 2024-11-04 18:41:51 字数 186 浏览 4 评论 0原文

我有两个应用程序通过 IPCChannel 进行通信。 我调用一个方法(特别是 property.get),该方法返回 80 多个对象的列表,每个对象又包含 500-1000 个对象。 此调用大约需要 40-60 秒才能完成。有没有一种方法可以确定估计的剩余时间,以便为用户提供一些反馈 - 除了拆分列表并逐个获取对象(这使得我自己可以计算剩余时间)之外?

I got two applications communicating via IPCChannel.
I call a method(specifically a property.get) that returns a list of 80+ objects, each containing another 500-1000 objects.
This call takes about 40-60 seconds to complete. Is there a way to determine the estimated remaining time in order to give the user some feedback - apart from splitting up the list and fetching the objects one by one (which would make it possible to compute the remaining time myself)?

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

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

发布评论

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

评论(1

温柔少女心 2024-11-11 18:41:51

将通信分成更小的部分实际上是解决这个问题的一个很好的方法。

您需要进行初始握手通信以确定要使用多少块,然后您可以准确估计所需时间。确保不要将其分解成太小的部分,以免通信开销降低性能。

Splitting the communication up into smaller pieces is actually a pretty good way to solve this problem.

You need to have an initial handshaking communication to establish how many pieces are to be used, but then you can give an accurate estimate of the time to go. Make sure that you don't break it up into pieces that are so small that the communication overhead degrades performance.

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