Re: File API Feedback

On Wed, 22 Jul 2009 20:26:38 +0200, Michael Nordman <michaeln@google.com> wrote:
> Another aspect of the use case we're discussing (composing a
> multipart/form-data POST for sending vis XHR2) is NOT having to actually
> read the full contents of the file parts into memory while doing this
> composition. That wouldn't work for a large file or for a large number of
> smaller files.
>
> Gears BlobBuilder accomplishes that by constructing a resulting Blob that
> internally keeps track of a collection of constituent Blobs (some of  
> which may be memory resident and other backed by a files on disk). When Gears
> HttpRequest sends one of these Blobs, it reads things incrementally. So  
> no big memory usage spikes when dealing with file backed Blobs during
> composition of the multipart Blob or during the sending of it (also no  
> big disk usage spikes during composition or sending).

Yeah, I suppose we have to mention that if there's some I/O failure after invoking send() with a FileData object it needs to throw in the sync case and the XMLHttpRequest object needs to dispatch the error event in the async case.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 22 July 2009 18:40:05 UTC