views:

33

answers:

4

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?

We are deeply stuck. Any help will be appreciated. Thanks in advance

A: 

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.

Chris Marisic
Thanks for responding. Will XMLHttpRequest solve the problem? I guess even then the browser restricts this. Is it possible to change this behavior?
KPK
A: 

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.

Guffa
Thanks. Is there any way to get around this?
KPK
@KPK: You can set up aliases for your domain, so that the browser thinks that they are separate domains.
Guffa
@Guffa, thanks. I tried setting up aliases using IIS. But I can't browse to the pages under the original folder. I get a host can't be resolved error. Do I need to tweek DNS for this? Any step-by-step article will be of great help. Thanks
KPK
A: 

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.

Sam
Thanks. Is there any way to change this default behavior?
KPK
A: 

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/

Mason