DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (d38398e5144e)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta charset="utf-8">
<head>
<title>accessibility perf for dhtml</title>
<script src="a11y.js"></script>
<script>
  // based on: http://hacks.mozilla.org/2010/05/better-performance-with-lazy-frame-construction/
  var ppDate = null;

  function doInsertion()
  {
    if (!initAccessibility()) {
      dump("__FAILinit:AccessibilityUnvailable__FAIL");
      return;
    }

    var container = document.getElementById("container");
    var lastchild = document.getElementById("lastchild");
    var start = new Date();
    var i,div;
    for (i = 0; i < 2000; i++) {
      div = document.createElement("div");
      div.innerHTML = "<input type='text' value='a bc def g hijkl mn op qrs'/>";
      container.insertBefore(div, lastchild);
    }
    for (i = 0; i < 2000; i++) {
      div = document.createElement("div");
      div.innerHTML = "<ul><li>foo<ul><li>bar</li></ul></li><li>baz</li></ul>";
      container.insertBefore(div, lastchild);
    }
    for (i = 0; i < 2000; i++) {
      div = document.createElement("div");
      div.innerHTML = "<div role='progressbar'>progressbar</div>" +
                      "<span id='span" + i + "'>cb</span>";
      container.appendChild(div);
    }
    document.documentElement.offsetLeft; // flush layout
    setTimeout(postProcessingRecord, 0, start);
  }

  function postProcessingRecord(s)
  {
    //alert(new Date() - s);
    tpRecordTime(new Date() - s, s);
  }
</script>
</head>
<body onload="doInsertion();">
  <div id="container" role="application"><div id="lastchild"></div></div>
</body>
</html>