[webkit-dev] Question regarding priorities of subresource content retrieval

Silvio Ventres silvio.ventres at gmail.com
Mon Feb 7 17:20:08 PST 2011


Hello again.
After some tinkering, here is a simple testcase that shows the bad behavior.
You will need node.js to run the test webserver.
The webserver delays answer for the amount of milliseconds specified
in the request string. No error checking is done.

The html uses the standard mechanism by which ads are embedded in
webpages: css and js includes. Both act serially: if both are delayed
for 4 seconds as they are in this example, the total delay before
seeing _anything_ is 8 seconds.

Tested in WinXP/Chrome 11.0.659.0 canary build: 8seconds delay.
Tested as well in Firefox3.6.13/4b10, same result.
It seems iOS 4.1's Mobile Safari miraculously does 4 seconds, whether
only one or both links are present.

For people that are too lazy to do "apt-get install nodejs", here's an
online version, will keep it upfor a few days:

http://solid.eqoppa.com/testlag.html


Please let know how to add it into the PerformanceTesting repository.

--
 silvio



----------------------weblag.js----------------------

var http = require('http');
server=http.createServer(function (req, res) {
  setTimeout(function() {
     res.writeHead(200, {'Content-Type': 'text/plain'});
     res.end('lag test\n');
     },req.url.substr(1,10));

}).listen(4004);
console.log('Server running at http://*:4004/');
------------------------------------------

------------------------testlag.html---------------------------
<html><head>
<link href='http://127.0.0.1:4004/4000' rel='stylesheet' type='text/css' />
<body>
<script src='http://127.0.0.1:4004/4000' charset='utf-8'
type='text/javascript'></script>
Each http://xx.xx.xx.xx:xx/<ms> request gets delayed by
<ms> milliseconds.
</body></html>
-------------------------------------------------------------------------



On 2/7/11, Mihai Parparita <mihaip at chromium.org> wrote:
> On Mon, Feb 7, 2011 at 12:32 PM, Adam Barth <abarth at webkit.org> wrote:
>> There is no PerformanceTest framework that deals with network latency.
>>  Please feel encouraged to build one.  :)
>
> Note that http://code.google.com/p/web-page-replay/ was created with
> this goal (to simulate realistic network behavior).
> http://calendar.perfplanet.com/2010/benchmark-the-network/ has a few
> more details, and Tony Gentilcore (one of its authors) is on this
> list.
>
> Mihai
>


More information about the webkit-dev mailing list