title: onreadystatechange is too slow
body: <p>Do anyone know what I'm doing wrong or why AJAX callbacks are TOO slow? Here's code:</p>
  
  <pre><code>function new_xmlhttp() {
  
      var xmlhttp;
      if(window.XMLHttpRequest) {
          xmlhttp = new XMLHttpRequest();
      } else {
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      }
  
      return xmlhttp;
  }
  
  function ajax_get(data, args) {
  
      xmlhttp = new_xmlhttp();
  
      xmlhttp.open("GET", "functions.php?" + data, true);
  
      xmlhttp.onreadystatechange = function() {
          if(xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
              // OK.
              alert(args);
          }
      }
  
      xmlhttp.send(null);
  }
  </code></pre>
  
  <p>Sometimes it takes 2-3 seconds to load (data is max 10 bytes long.)</p>
  
  <p>Tested on Firefox and Chrome under Linux.</p>