PageAsyncTask 未并行运行
我正在检查异步网页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.09111Any 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,您可以使用 PageAsyncTask 构造函数的“executeInParallel”参数来控制此行为。
It turned out that you can use the "executeInParallel" parameter of the PageAsyncTask constructor to control this behaviour.