[html5] XHR Questions

Anne van Kesteren annevk at annevk.nl
Sun Mar 20 09:51:29 PDT 2016

On Sun, Mar 20, 2016 at 5:18 PM, Gomer Thomas
<gomer at gomert-consulting.com> wrote:
> It would require the allocation of a buffer to handle the response to each HTTP request, which is always needed when an HTTP request is made.

The problem is that each time you get the property, it requires the
allocation of a new JavaScript object, be it a string or ArrayBuffer,
since those are fixed in size. Unless an engine goes out of its way to
share memory in those cases (and some do for strings I believe through
many complicated tricks) you end up ballooning memory usage. Nobody
wanted to repeat the tricks from strings for other objects, be it Blob
or ArrayBuffer, so we left it at that.

> I can understand the value of providing a more efficient new mechanism that will allow treating the response to an HTTP request as a stream, so that the entire response does not need to be buffered, but I don't understand why the (less efficient) existing mechanism must be removed years before the new mechanism is fully specified and widely implemented.

Well, all implementers refused to implement it. The buck stops there really.

> Unfortunately, this whole exchange has left me uneasy about the WHATWG decision processes.

When this was "decided" XMLHttpRequest was still hosted by the W3C.

Anyway, a draft containing some feature is not a guarantee. If it was
actually implemented by two or more engines you'd have some legitimate
grief, but since it never got to that stage it's only reasonable for
it to be removed from subsequent drafts.


More information about the Help mailing list