[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:


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



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

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

<link href='' rel='stylesheet' type='text/css' />
<script src='' charset='utf-8'
Each http://xx.xx.xx.xx:xx/<ms> request gets delayed by
<ms> milliseconds.

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