[Webkit-unassigned] [Bug 36903] Implement BlobBuilder internal class for BlobBuilder support as defined in FileWriter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 1 18:29:51 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36903


Dmitry Titov <dimich at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #52227|review?                     |review-
               Flag|                            |




--- Comment #4 from Dmitry Titov <dimich at chromium.org>  2010-04-01 18:29:50 PST ---
(From update of attachment 52227)
General comment: it seems you are taking the path of converting the parts
appended by append() method to ByteStore immediately and synchronously on
append(). This will have 2 undesired effects:

1. Converting strings happen right away, while the result may not even be used
at the end.

2. When you will need to implement append(FileBlob) you will need to fetch the
file data immediately, because it can come between 2 append(String) calls

3. When someone appends an bunch of Strings and then changes Blob.endings,
those strings will have to be re-appended, which is multiple work. I'm not sure
how it will even work with the FileBlobs in the mix.

It seems the Blob should simply contain a list of all appended items, and delay
the actual conversions to the end usage point. this way, perhaps you will never
even need ByteStore object - indeed, the Blob could just implement read(...)
method by walking the list and converting/filling the provided buffer in 'on
demand' fashion.

I mentioned in the webkit-dev discussion and still think that introducing
ByteStore will eventually make Blob.append(FileBlob) a read-file-right-now
operation... And if we don't read/combine anything until absolutely necessary,
we shouldn't have to need ByteStore, at least in this explicit form.

r- because strings can not be converted/merged right in the append(String)
method, due to reasons above.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list