<story><title>The Several Million Dollar Bug</title><url>http://jacquesmattheij.com/the-several-million-dollar-bug</url><text></text></story><parent_chain></parent_chain><comment><author>stevejones</author><text>This isn&amp;#x27;t remotely a bug, it&amp;#x27;s not even really anything to do with browsers. The browser will be doing (roughly) the following:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    while pending_requests():
        send_request()
        read_response()
&lt;/code&gt;&lt;/pre&gt;
But what send_request and read_response are doing is putting data on the OS&amp;#x27;s outbound queue and then attempting to get data from the inbound queue. If the data is already in the inbound queue before the request is put on the outbound queue it doesn&amp;#x27;t matter - the browser is not aware of this fact. So long as the &amp;quot;responses&amp;quot; don&amp;#x27;t come in faster than the browser is sending requests and causing the queue to overfill, and so long as the responses send out come in the order the browser is sending requests this technique will work. In general this is just an &amp;quot;optimistic strategy&amp;quot;.</text></comment>
<story><title>The Several Million Dollar Bug</title><url>http://jacquesmattheij.com/the-several-million-dollar-bug</url><text></text></story><parent_chain></parent_chain><comment><author>joosters</author><text>An alternative way to pump lots of webcam frames was to use multipart-MIME responses. That way, there was only one HTTP request and the response just streamed JPEG images, one after the other. No need to break any specifications to get full network usage.</text></comment>