PageAsyncTask 未并行运行

发布于 2024-10-02 06:58:32 字数 600 浏览 1 评论 0原文

我正在检查异步网页async="True"。在 Page_Load 中,我使用 RegisterAsyncTask 注册 3 个任务。其中每个任务都调用一个 SQL Server 存储过程。存储过程正在执行简单的选择并使用 WAITFOR DELAY '00:00:02'
等待几秒钟 我的问题是页面需要 6 秒才能返回给我,而不是 2 秒。

这是页面的痕迹。

aspx.page   Begin Load           0.000173230943152662    0.000013 
Inside      BeginAsyncOperation1 0.000268187163843751    0.000095 
Inside      BeginAsyncOperation2 0.000517126445114984    0.000249 
Inside      BeginAsyncOperation3 0.000642237681836351    0.000125 
aspx.page   End Load             6.09175786420362        6.09111 
Any ideas/suggestions?

I am examining async web pages async="True". In Page_Load, I am registering 3 tasks using RegisterAsyncTask. Each of these tasks is calling a SQL Server stored procedure. The stored procedure is doing a simple select and waiting for a couple of seconds using WAITFOR DELAY '00:00:02'
My problem is that the pages takes 6 seconds to get back to me instead of just 2 seconds.

This is the trace of the page.

aspx.page   Begin Load           0.000173230943152662    0.000013 
Inside      BeginAsyncOperation1 0.000268187163843751    0.000095 
Inside      BeginAsyncOperation2 0.000517126445114984    0.000249 
Inside      BeginAsyncOperation3 0.000642237681836351    0.000125 
aspx.page   End Load             6.09175786420362        6.09111 

Any ideas/suggestions?

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

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

发布评论

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

评论(1

岁月打碎记忆 2024-10-09 06:58:32

事实证明,您可以使用 PageAsyncTask 构造函数的“executeInParallel”参数来控制此行为。

It turned out that you can use the "executeInParallel" parameter of the PageAsyncTask constructor to control this behaviour.

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