New issue
Advanced search Search tips

Issue 740559 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

0.8% regression in sizes/libcronet.so on android_cronet_m64_perf at 485053:485069

Project Member Reported by xunji...@chromium.org, Jul 10 2017

Issue description

Performance dashboard identified a 0.8% regression in sizes/libcronet.so on android_cronet_m64_perf at revision range 485053:485069. Graph: https://chromeperf.appspot.com/report?masters=ChromiumAndroid&bots=android_cronet_m64_perf&tests=sizes%2Flibcronet.so&checked=libcronet.so%2Clibcronet.so_ref%2Cref&rev=485069

Bisect gives me r485061 (Initialize TaskScheduler on cronet.)
There is a 30 - 40KB increase of cronet binary on the bots. Building armv7 release libcronet.so with and without r485061 shows a 20KB difference locally. Not sure if there's anything we can do about it.
 

Comment 1 by mef@chromium.org, Jul 10 2017

I think this is the price we have to pay.

Comment 2 by mmenke@chromium.org, Jul 10 2017

I think we're going to want to move away from taking threads as inputs in net/ classes (Though we'll need the one for the cache, as that's a SingleThreadedTaskRunner instead of a SequencedTaskRunner)

Once we get DNS and the SimpleCache using the scheduler instead of worker pools, that also means Cronet will potentially be keeping around fewer threads as well.

Comment 3 by eroman@chromium.org, Jul 10 2017

Components: Internals>TaskScheduler
Thanks for filing the size increase!

I would say this is a WontFix, but adding the TaskScheduler team so they are aware of the binary size increase and can comment.

The switch to TaskScheduler was inevitable; whether in my CL, or a subsequent one to tackle say https://bugs.chromium.org/p/chromium/issues/detail?id=659191 in //net code.

The binary increase this introduces will to a (probably small) degree be offset in the future when supporting code like WorkerPool can be deleted.

The justification for this increase is hopefully as Matt suggests, that we will see runtime resource reduction (memory and/or threads) in the future.

Comment 4 by gab@chromium.org, Jul 11 2017

Right we saw this when enabling in renderers a while back but it was quickly offset by enabling SequencedWorkerPool redirection (which makes its API merely a front that forwards to TaskScheduler. The redirection is about to be default everywhere (if SequencedWorkerPool usage isn't completely phased out first), in the meantime you can use SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess() in your main.

Comment 5 by gab@chromium.org, Jul 11 2017

Or wait thought this was memory, but looks like binary size? Why would a runtime thing make the library larger? No more LTO suppression of the TaskScheduler code?

Comment 6 by mmenke@chromium.org, Jul 11 2017

The TaskScheduler wasn't being instantiated on Cronet, so now that we're doing that, we saw a binary size increase.  Eric and I were just pointing out we may see some reduction in runtime memory usage as a result of the change, since (once everything uses TaskScheduler), we'll probably be keeping around fewer threads, as both the cache and DNS resolver use worker pools.

Comment 7 by mmenke@chromium.org, Jul 11 2017

Oh, sorry, misunderstood your confusion.  Correct, if we never instantiated the TaskScheduler, LTO presumably eliminated the code.
Status: WontFix (was: Untriaged)
Thanks everyone for the context. The potential runtime resource savings make sense to me and it looks like the binary size increase is inevitable and might be mitigated once we completely switch over to TaskScheduler. 
I will WontFix this one.

Sign in to add a comment