[WebSocket] Remove manual quota control for receiving.
Because we're using mojo data pipe, which has own quota control, to transfer received data, we don't have manual one, or mojom::WebSocket.AddReceiveFlowControlQuota(). This CL does a sort of work removing the function. mojom::WebSocket.AddReceiveFlowControlQuota(quota) did 5 tasks: browser side(mainly on WebSocketChannel) 1. Trigger the first ReadFrame if renderer gets not throttled. For #1, this patch moves the trigger to mojo WebSocket.StartReceiving. 2. Trigger next ReadFrame if there is enough quota. 3. Send pending dataframes based on added quota. This patch moves task #2 and #3 to websocket.cc and datapipe itself. 4. Dropchannel if all pending frames are received by renderer when closed. Because we can care #4 w/o renderer ping back, this patch move RespondToClosingHandshake()to WebSocketChannel::ReadFrames(). renderer side(mainly on WebSocketChannelImpl) 5. Ping browser that backpressure is turned off. For task #5, this patch changes not to call the mojo but throttle datapipe reading with WebSocketHandleImpl::ConsumePendingDataFrames(). receive-arraybuffer-1MBx100.htmll?iteration=100 measurement on local build: ToT: 144 MB/s (stdev: 4.56 MB/s) Patch: 208 MB/s (stdev: 6.15 MB/s) (+44% to ToT, +41% to ReadOnlyBuffer) ReadOnlyBuffer: 147 MB/s Change-Id: I61feab06f0e3719520e6a47eea61e0322e4da01f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763507 Commit-Queue: Yoichi Osato <yoichio@chromium.org> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Karan Bhatia <karandeepb@chromium.org> Reviewed-by:
Adam Rice <ricea@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#691072}
Showing
This diff is collapsed.
Please register or sign in to comment