iFrames not executing in parallel

2019-06-10 00:43发布

We are using 6 iFrames on our page. They fetch data from couple of external web services and an internal WCF service and display the data. There is a separate aspx page built for each of the iFrames. From our perf monitoring we found out that at any point only two threads are executing in parallel. Not all 6 threads get executed. What can probably be cause for this? Is there any restriction that more than 2 threads can't be created in parallel? Is there any configuration where I can change this?

6条回答
beautiful°
2楼-- · 2019-06-10 01:23

IIS has an upper limit on the number of concurrent threads it will execute, the rest will get queued until the first two are finished. A phenomenon I've run into as well when using callbacks.

查看更多
Bombasti
3楼-- · 2019-06-10 01:25

If you make your iframes point to different DNS then the browser should parallelize them all.

See here: http://www.websiteoptimization.com/speed/tweak/parallel/

查看更多
smile是对你的礼貌
4楼-- · 2019-06-10 01:29

This is true of IE6 and IE7. Nothing to do with DNS. To simulate this, run three or more downloads simultaneously in IE and you will find that only two at a time are executed, the rest will wait. Different case with Firefox, which I believe is 6 - worth checking.

查看更多
看我几分像从前
5楼-- · 2019-06-10 01:29

Most web browsers set limits on the amount of threads that will be used concurrently for rendering elements. I believe the default is 2 for many web browsers. So what you are seeing is correct, the browser itself is only requesting 2 objects at a time.

查看更多
狗以群分
6楼-- · 2019-06-10 01:29

I had this problem too. You might be hitting a session lock in ASP.NET.

In short set EnableSessionState in the @ Page directive to ReadOnly.

I found it from this answer which deserves the credit:- IIS Express 7.5 not processing requests concurrently

查看更多
祖国的老花朵
7楼-- · 2019-06-10 01:46

Most browsers will only make two requests at a time from each domain.

If the requests aren't session-less, only one requests at a time from each user is handled by the server, other requests from the same user are queued.

查看更多
登录 后发表回答