Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 1037443002: Move oknet's read operations to a background thread (Closed)

Created:
5 years, 9 months ago by abarth-chromium
Modified:
5 years, 9 months ago
Reviewers:
ojan
CC:
ojan, mojo-reviews_chromium.org, qsr+mojo_chromium.org, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Move oknet's read operations to a background thread The read operation on OkHttp's ResponseBody object is blocking. The thread on which we perform the read is highly contended during initial load. This CL moves the read operation to a background thread, improving startup time for StocksApp by 1s on a Nexus 5. Ideally we would perform an asynchronous read on the stream, but that is not currently possible in OkHttp according to http://stackoverflow.com/questions/29222231/reading-okhttp-responsebody-data-asynchronously R=ojan@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/46ced9ba693dd4f56d1d44e13e60ea3d66f9f792

Patch Set 1 #

Patch Set 2 : less try-catch #

Patch Set 3 : less try catch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -38 lines) Patch
M sky/services/oknet/src/org/domokit/oknet/UrlLoaderImpl.java View 1 2 6 chunks +11 lines, -38 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
abarth-chromium
5 years, 9 months ago (2015-03-24 17:32:31 UTC) #1
ojan
lgtm
5 years, 9 months ago (2015-03-24 19:43:38 UTC) #2
abarth-chromium
5 years, 9 months ago (2015-03-24 19:44:10 UTC) #3
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
46ced9ba693dd4f56d1d44e13e60ea3d66f9f792 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698