On Sep 27, 2010, at 6:40 PM, James Robinson wrote: > On Mon, Sep 27, 2010 at 6:37 PM, Maciej Stachowiak <m...@apple.com> wrote: > > On Sep 27, 2010, at 3:19 PM, Michael Nordman wrote: > >> Webkit's XHR currently does not keep two copies of the data that I can see. >> I think we should avoid that. > > We could keep the raw data around, which hopefully is directly usable as an > ArrayBuffer backing store, and only translate it to text format when/if the > client requests responseText. > > > It would be unfortunate to have to keep the raw data around after the page > access .responseText, given that the overwhelming majority of pages will > touch .responseText and nothing else. I found when improving the V8 XHR > implementation that the memory footprint of .responseText being held off of > the XHR object itself was often significant so I would be very reluctant to > grow it by an addition 50-100% (depending on encoding) in the common case.
But do you think you'd ever need more than one copy of the raw bits from the response? Seems like you should be able to return a responseText and a responseArrayBuffer from the same raw bits. Am I missing some detail of how XHR works? ----- ~Chris cmar...@apple.com
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev