Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Strange delay between scripts in IE8 #20

Closed
sajal opened this issue Feb 28, 2011 · 4 comments
Closed

Strange delay between scripts in IE8 #20

sajal opened this issue Feb 28, 2011 · 4 comments
Labels

Comments

@sajal
Copy link

sajal commented Feb 28, 2011

please see : http://www.webpagetest.org/result/110228_4D_3bb68ed39c46b859b9a84778f4c530a9/5/details/

I am loading LABjs using the async snippet and providing it a list of scripts to fetch. no ".wait()" .

But if you see the waterfall(Internet Explorer 8) linked to above, requests 8 to 13 - the ones injected by Labjs, have roughly 50ms gap between starting the requests. This is not a browser limitation since there is no other network activity going on to saturate the browsers limitations. Also, the cpu is also not busy during that time since no other script is being parsed/executed.

This gap between start of request is not seen on firefox and ie9 RC.

Couldnt find anything in the source which could be adding a settimeout for 50 or 60ms..

@getify
Copy link
Owner

getify commented Feb 28, 2011

  1. You should always have at least an empty .wait() at the end of a chain, even if you have no logic to have it perform.
  2. Are you saying there's a 50ms delay before LABjs starts, or are you saying that each script starts 50ms after the one before it?

@sajal
Copy link
Author

sajal commented Feb 28, 2011

just added the .wait()
im saying that there is ~50ms delay between the start of each script after the one before it has started.
<script type="text/javascript">
var asyncjsscripts = [];
asyncjsscripts.push('http://mediacdn.disqus.com/1298421702/build/system/embed.js');
asyncjsscripts.push('http://platform.twitter.com/widgets.js');
asyncjsscripts.push('http://www.google-analytics.com/ga.js');
asyncjsscripts.push('http://connect.facebook.net/en_US/all.js#xfbml=1');
asyncjsscripts.push('http://static.poptattle.com/js/trafficpace.js');
asyncjsscripts.push('http://mediacdn.disqus.com/1298421702/build/system/count.js');
</script>
I use the async snippet from https://gist.github.com/603980
my function f() from line 5 reads as:-
function f(){
$LAB.script(asyncjsscripts).wait();
}

http://www.webpagetest.org/result/110228_4D_3bb68ed39c46b859b9a84778f4c530a9/5/details/ (see #8 to #13)

Internet Explorer 7(and 9) does not have this issue, they start downloading as soon as a download slot is available in the browser.

@getify
Copy link
Owner

getify commented Feb 28, 2011

I don't really have an answer. There's no artificial delays inside of LABjs. It sounds possibly like a bug or network connection timing issue in IE8, especially since other browsers/versions don't exhibit the problem.

@sajal
Copy link
Author

sajal commented Feb 28, 2011

Thanks for your replies. On poking further it looks like a bug in webpagetest.org...
ive posted it here http://www.webpagetest.org/forums/showthread.php?tid=558

Basically the tcpdump shows that the requests are made instantly as expected.. so its not a LABjs issue..

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants