This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23732 - Consider adding best-effort scatter/gather mode
Summary: Consider adding best-effort scatter/gather mode
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Streams API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Takeshi Yoshino
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 18:50 UTC by Takeshi Yoshino
Modified: 2013-12-05 19:33 UTC (History)
2 users (show)

See Also:


Attachments

Description Takeshi Yoshino 2013-11-05 18:50:44 UTC
Best-effort scatter/gather mode, maybe as readType of e.g. "arraybuffer/sg" for "arraybuffer", relaxes the requirement that "readPromise is fulfilled with one object of the specified type" and allows fulfilling with fragments. This would be useful for performance sensitive apps since Stream implementation can choose to keep the original until right before fulfilling readPromise, and if it's set to "*/sg" type, just return an Array of the fragments without doing concat/split as possible.

Best-effort means that it's not guaranteed that everything is kept as-is. Concat/split may happen.
Comment 1 Takeshi Yoshino 2013-11-07 19:27:28 UTC
Seems we don't need this. Once read is split into read and readExact and make read method sync/async hybrid, we can receive fragments without post tasking cost.
Comment 2 Takeshi Yoshino 2013-11-08 08:23:25 UTC
(In reply to Takeshi Yoshino from comment #1)
> Seems we don't need this. Once read is split into read and readExact and
> make read method sync/async hybrid,

This is discussed at this bug.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23772
Comment 3 Takeshi Yoshino 2013-11-13 19:32:05 UTC
Done in preview ver.
https://dvcs.w3.org/hg/streams-api/raw-file/tip/preview.html

Implementations can choose to delay serialization, split and concatenation as much as possible.
Comment 4 Takeshi Yoshino 2013-12-05 19:33:32 UTC
Preview ver merged into ED.