gaps in waterfalls

Hi,
if I test an HTTPS-site I am getting gaps in entries of waterfall-presentation when test with IE version 10:
http://www.webpagetest.org/result/140113_K3_HHJ/1/details/
If I export HTTP-archive and show same waterfall in online-har-viewer (HTTP Archive Viewer 2.0.17) the waterfall looks correct.
Tests with urlblast look correct, too:
http://www.webpagetest.org/result/140113_J9_J26/
Regards, Nils

We figured out that the gaps are created in the method “FixUpRequestTimes” (from object_detail.inc file).

The elder version of the agent (wptdriver 130) generates waterfall images without gaps since it uses the fields “ssl_ms”, “connect_ms” and “dsl_ms” to calculate the timings. The timings are calculated backwards from the request field “load_start” since the fields “ssl_start”, “connect_start” and “dns_start” are not set and therefore $start is zero:

foreach (array('ssl', 'connect', 'dns') as $key) {
   $start = $end = $ms = 0;
   [...]
   if (array_key_exists($key . '_start', $req))
       $start = $req[$key . '_start'];
   [...]
   if ($start == 0) {
      // Compute start for old-style timing.
      $start = $all_start - $ms;
      $end = $start + $ms;
   }
}

In the new version of the agent (wptdriver 153) the “_start” and “_end” fields are set and the timings are calculated using these fields. Later on “ttfb_start” is set to the value of “load_start”. However, “ssl_end” isn’t equal to “load_start” and the value of “ttfb_start” is greater than “ssl_end”. Thus, a gap is rendered between “ssl_end” and “ttfb_start”:

$req['ttfb_start'] = $req['load_start'];

Unfortunately, we weren’t able to figure out how the correct rendering should be?

We inferred some possiblilities how the correct result could look like:

  1. The start of dns lookup, ssl negotiation etc. are correct but Time To First Byte is rendered too late.
  2. The start of ttfb is correct and dns lookup, ssl negotiation etc. have to be rendered later.
  3. The start of dns lookup, ssl negotiation etc. and the start of ttfb are correct but Time To First Byte have to last longer to fill the gap.

Do you have an idea which is the right solution for fixing this bug?

The correct rendering is with the gaps. Modern browsers can pre-connect (and resolve) before they actually make the request. The HAR spec (and the older WPT implementation) assumed that the dns and connect immediately preceded the request.

btw, there may be something specific to IE 10 where part of the SSL negotiation isn’t being measured. From the looks of the waterfalls, the SSL negotiation is only 1 RTT and it should likely be higher.

Thanks a lot for the information about pre-connections, that’s very interesting!