On 2013/07/09 17:58:21, abarth wrote: > Looks like a good start. Obviously we'll need a ...
7 years, 5 months ago
(2013-07-09 19:50:51 UTC)
#5
On 2013/07/09 17:58:21, abarth wrote:
> Looks like a good start. Obviously we'll need a bunch of tests, but the
> implementation looks to be on the right track.
Thanks. Yes, I have a pending CL adding Stream support to FileReader.
https://codereview.chromium.org/18635004/ (not ready yet)
To test Stream we need to introduce some reading method. It could be
FileReader, StreamReader, or something else accesses it via blob URL.
It's TBD.
michaeln
We have a latent desire to avoid sending bulky response data to renderers, then back ...
7 years, 5 months ago
(2013-07-24 03:24:37 UTC)
#6
We have a latent desire to avoid sending bulky response data to renderers, then
back to the main process, then to renderers again when it comes to how
.responseBlob is implemented. This preliminary .responseStream impl has that
back-and-forth characteristic too. Do we want that for this initial cut at this?
michaeln
https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpRequest.cpp#newcode1194 Source/core/xml/XMLHttpRequest.cpp:1194: m_responseStream->addData(data, len); Also, it it a desired characteristic of ...
7 years, 5 months ago
(2013-07-24 03:57:21 UTC)
#7
https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpReq...
File Source/core/xml/XMLHttpRequest.cpp (right):
https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpReq...
Source/core/xml/XMLHttpRequest.cpp:1194: m_responseStream->addData(data, len);
Also, it it a desired characteristic of this implementation that the network be
gated such that it run too far ahead of the stream consumer? And if so, is that
flow control an important characteristic? If that is the behavior we want, I
think this approach (stuffing data into the stream at this callsite) makes that
more challenging to achieve then some alternatives (that would stuff data into
the stream in the browser process).
7 years, 5 months ago
(2013-07-24 03:57:45 UTC)
#8
On 2013/07/24 03:57:21, michaeln wrote:
>
https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpReq...
> File Source/core/xml/XMLHttpRequest.cpp (right):
>
>
https://codereview.chromium.org/18883002/diff/8001/Source/core/xml/XMLHttpReq...
> Source/core/xml/XMLHttpRequest.cpp:1194: m_responseStream->addData(data, len);
> Also, it it a desired characteristic of this implementation that the network
be
> gated such that it run too far ahead of the stream consumer? And if so, is
that
> flow control an important characteristic? If that is the behavior we want, I
> think this approach (stuffing data into the stream at this callsite) makes
that
> more challenging to achieve then some alternatives (that would stuff data into
> the stream in the browser process).
s/b "doesn't run too far ahead"
tyoshino (SeeGerritForStatus)
On 2013/07/24 03:24:37, michaeln wrote: > We have a latent desire to avoid sending bulky ...
7 years, 4 months ago
(2013-08-06 19:15:02 UTC)
#9
On 2013/07/24 03:24:37, michaeln wrote:
> We have a latent desire to avoid sending bulky response data to renderers,
then
> back to the main process, then to renderers again when it comes to how
> .responseBlob is implemented. This preliminary .responseStream impl has that
> back-and-forth characteristic too. Do we want that for this initial cut at
this?
Filed a bug.
crbug.com/269055
It makes sense but I'd like to deliver Stream asap for customers.
tyoshino (SeeGerritForStatus)
Rebased. Ready basically. I'm planning to implement Stream reading feature on FileReader temporarily. Wdyt Adam? ...
7 years, 4 months ago
(2013-08-06 19:18:41 UTC)
#10
On 2013/08/06 19:35:55, abarth wrote: > I'm not sure it's worth implementing streams in this ...
7 years, 4 months ago
(2013-08-06 22:14:42 UTC)
#13
On 2013/08/06 19:35:55, abarth wrote:
> I'm not sure it's worth implementing streams in this temporary way. Why not
> implement them using the better approach of keeping the data on the browser
side
> until needed?
>
Media Stream Extension people are asking us to provide Stream. The points of
Stream+XHR are
- allow starting reading binary data in LOADING state
- discard partially read data to reduce memory usage and enable streaming very
long data
- and, as you said, it's better that Stream data is kept inside browser process
until it's consumed
first two points would be addressed with this impl
>
https://codereview.chromium.org/18883002/diff/23001/Source/core/xml/XMLHttpRe...
> File Source/core/xml/XMLHttpRequest.cpp (right):
>
>
https://codereview.chromium.org/18883002/diff/23001/Source/core/xml/XMLHttpRe...
> Source/core/xml/XMLHttpRequest.cpp:396: return ASCIILiteral("");
> Don't bother adding ASCIILiteral. It's a no-op and we're removing it from the
> codebase.
>
oh, i'll remove it again.
>
https://codereview.chromium.org/18883002/diff/23001/Source/core/xml/XMLHttpRe...
> Source/core/xml/XMLHttpRequest.cpp:1195: m_responseStream->addData(data, len);
> Do we have to route the data to the render process? I thought the point of
> streams was to keep the data in the browser process until it's needed.
it wound be not small work. i'd like to work on it after providing initial
implementation. this is a bug for that.
crbug.com/269055
abarth-chromium
Ok, if we're going to go with the approach of having the data flow through ...
7 years, 4 months ago
(2013-08-07 00:11:13 UTC)
#14
Ok, if we're going to go with the approach of having the data flow through the
render process, then this implementation looks very reasonable. We'll need some
tests, of course. :)
michaeln
On 2013/08/07 00:11:13, abarth wrote: > Ok, if we're going to go with the approach ...
7 years, 4 months ago
(2013-08-07 00:21:24 UTC)
#15
On 2013/08/07 00:11:13, abarth wrote:
> Ok, if we're going to go with the approach of having the data flow through the
> render process, then this implementation looks very reasonable. We'll need
some
> tests, of course. :)
And probably some logic to error out in the case where the consumer of a large
stream isn't reading fast enough.
kinuko
Same comment, the way how responseBlob was added was unfortunate and it's going in the ...
7 years, 4 months ago
(2013-08-07 03:46:57 UTC)
#16
Same comment, the way how responseBlob was added was unfortunate and it's going
in the same way, but it'd work as a intermediary solution and might be slightly
better in terms of memory consumption (in average case).
On 2013/08/07 00:21:24, michaeln wrote:
> On 2013/08/07 00:11:13, abarth wrote:
> > Ok, if we're going to go with the approach of having the data flow through
the
> > render process, then this implementation looks very reasonable. We'll need
> some
> > tests, of course. :)
>
> And probably some logic to error out in the case where the consumer of a large
> stream isn't reading fast enough.
Probably streams side should have a mechanism to handle this, e.g. to spill out
to a file? But until then we'll need some guard to prevent excessive memory
usage.
michaeln
On 2013/08/07 03:46:57, kinuko wrote: > Same comment, the way how responseBlob was added was ...
7 years, 4 months ago
(2013-08-07 18:12:01 UTC)
#17
On 2013/08/07 03:46:57, kinuko wrote:
> Same comment, the way how responseBlob was added was unfortunate and it's
going
> in the same way, but it'd work as a intermediary solution and might be
slightly
> better in terms of memory consumption (in average case).
>
> On 2013/08/07 00:21:24, michaeln wrote:
> > On 2013/08/07 00:11:13, abarth wrote:
> > > Ok, if we're going to go with the approach of having the data flow through
> the
> > > render process, then this implementation looks very reasonable. We'll
need
> > some
> > > tests, of course. :)
> >
> > And probably some logic to error out in the case where the consumer of a
large
> > stream isn't reading fast enough.
>
> Probably streams side should have a mechanism to handle this, e.g. to spill
out
> to a file? But until then we'll need some guard to prevent excessive memory
> usage.
Streams shouldn't need to spill to disk ever if i understand the intent. The
producer should be throttled by a consumers laziness at consuming. At least
that's how i understand the intent. The stream impl should maintain a smallish
buffer of what the produced data which the consumers takes from. As the consumer
drains the buffer, the stream impl fills the buffer with more data from the
producer.
If the "producer" of the stream data is a network source, when the consumer
stops reading, the system should stop reading from the network once the
"smallish" buffer is full. If the producer of the stream data is a script, the
script should stop adding data if the buffer is full, and resume adding data
once the consumer has drained it some. Flow control is the feature.
There is no mechanism in this current approach to throttle the network read when
the smallish buffer is full.
tyoshino (SeeGerritForStatus)
On 2013/08/07 18:12:01, michaeln wrote: > Streams shouldn't need to spill to disk ever if ...
7 years, 4 months ago
(2013-08-22 09:39:46 UTC)
#18
On 2013/08/07 18:12:01, michaeln wrote:
> Streams shouldn't need to spill to disk ever if i understand the intent. The
> producer should be throttled by a consumers laziness at consuming. At least
...
Yes. I'd like to put back pressure to loader and TCP stack.
Stream with spill-to-disk could be used as micro optimization for
store-and-consume-later type app, but sounds not big deal.
For now, at least to prevent browser crash I've added total memory consumption
limit similar to one in blob_storage_controller to stream_registry.
https://codereview.chromium.org/22908008/
On 2013/08/07 00:11:13, abarth wrote: > Ok, if we're going to go with the approach ...
7 years, 4 months ago
(2013-08-23 03:37:38 UTC)
#20
On 2013/08/07 00:11:13, abarth wrote:
> Ok, if we're going to go with the approach of having the data flow through the
> render process, then this implementation looks very reasonable. We'll need
some
> tests, of course. :)
Each user of Stream writes their own layout tests. So, we can move forward
without read operation tests, I think.
I just added some simple tests to check responseType and response value without
pulling data from Stream.
tyoshino (SeeGerritForStatus)
Rebased and added layout tests. Ready for review again.
7 years, 4 months ago
(2013-08-23 03:38:20 UTC)
#21
Rebased and added layout tests.
Ready for review again.
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/18883002/diff/39001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/18883002/diff/39001/Source/core/xml/XMLHttpRequest.cpp#newcode849 Source/core/xml/XMLHttpRequest.cpp:849: I think you need something like the following here: ...
7 years, 4 months ago
(2013-08-23 23:54:01 UTC)
#22
On 2013/08/27 08:51:51, tyoshino wrote: > Right, thanks. I'd like to introduce and call abort() ...
7 years, 3 months ago
(2013-08-29 06:40:13 UTC)
#24
On 2013/08/27 08:51:51, tyoshino wrote:
> Right, thanks. I'd like to introduce and call abort() instead of finalize
> to tell the receiver it's failed.
>
> Chromium side change needed for this.
> https://codereview.chromium.org/23543002/
This CL has been landed
and split BlobRegistry part of this CL into
https://codereview.chromium.org/23490013/
tyoshino (SeeGerritForStatus)
On 2013/08/29 06:40:13, tyoshino wrote: > and split BlobRegistry part of this CL into > ...
7 years, 3 months ago
(2013-09-02 07:21:34 UTC)
#25
On 2013/08/29 06:40:13, tyoshino wrote:
> and split BlobRegistry part of this CL into
> https://codereview.chromium.org/23490013/
This CL has also been landed.
PTAL
tyoshino (SeeGerritForStatus)
On 2013/09/02 07:21:34, tyoshino wrote: > On 2013/08/29 06:40:13, tyoshino wrote: > > and split ...
7 years, 3 months ago
(2013-09-05 09:37:57 UTC)
#26
On 2013/09/02 07:21:34, tyoshino wrote:
> On 2013/08/29 06:40:13, tyoshino wrote:
> > and split BlobRegistry part of this CL into
> > https://codereview.chromium.org/23490013/
>
> This CL has also been landed.
>
> PTAL
Kinuko-san,
Could you also review this?
kinuko
I think this lgtm (as a stopgap for MSE) https://codereview.chromium.org/18883002/diff/65002/LayoutTests/http/tests/xmlhttprequest/response-stream-abort.html File LayoutTests/http/tests/xmlhttprequest/response-stream-abort.html (right): https://codereview.chromium.org/18883002/diff/65002/LayoutTests/http/tests/xmlhttprequest/response-stream-abort.html#newcode78 LayoutTests/http/tests/xmlhttprequest/response-stream-abort.html:78: ...
7 years, 3 months ago
(2013-09-05 13:48:40 UTC)
#27
Issue 18883002: Add Streams API support to XMLHttpRequest
(Closed)
Created 7 years, 5 months ago by tyoshino (SeeGerritForStatus)
Modified 7 years, 2 months ago
Reviewers: abarth-chromium, michaeln, acolwell GONE FROM CHROMIUM, kinuko
Base URL: svn://svn.chromium.org/blink/trunk
Comments: 12