New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 785551 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

~100 SetFieldTrialGroup tasks during renderer startup

Project Member Reported by dskiba@chromium.org, Nov 15 2017

Issue description

(This is on 1GiB Android Go device (gobo) running OMB1.171105.001.)

I noticed that many SetFieldTrialGroup tasks run in renderer during startup. In the attached trace 96 tasks were run during first 520ms of renderer startup, and those tasks took 86ms total.


Is it possible to defer or optimize those tasks?
 
SetFieldTrialGroup.html.gz
1.3 MB Download
SetFieldTrialGroup.png
22.4 KB View Download
Components: Internals>Metrics>Variations
Labels: -Performance-Loading
Cc: roc...@chromium.org
Thanks for bringing this up.

The most straight forward way to fix this is to introduce batching, where we can notify about multiple field trials in one IPC and have a time duration that the sender will wait to receive more messages before sending the IPC.

It does add a bit of complexity and I do wonder whether Mojo team has thought about doing this sort of optimization internally? (Or through a standard mechanism that a given Mojo client could configure?)

Adding rockot@ re: mojo question.
Hmm, we also see this even in the browser process though. I think batching from the field trials component independent of mojo could be an overall win

Comment 4 by roc...@chromium.org, Nov 16 2017

Yeah, sounds like something that should be solved at the application layer,
i.e. field trial mojom & impl.

I doubt there's a good batching policy we could impose internally that
would work for all use cases, so we shouldn't impose one at all.

The best I think we could do, just for the sake of completeness, would be
at a low level to support something like named batching groups to which
messages can be explicitly assigned, and an API to flush a batch by name.

Then the bindings could create a sequence-local batching group for every
sequence so that all sent messages are implicitly batched, and we could
flush every sequence's batch after every task run on that sequence (or
after any sync IPC is sent). This is a good bit of complexity for something
we could just address at the application layer when needed.
Do we have an UMA metric that would improve if we fix this?

If we're not tracking these types of problems in the wild and are not monitoring for regressions, then what's to say that any changes we do here won't just regress at some point?

If we have good metrics here, it would be easier to justify spending time to fix this.
Random note: I saw this in the browser process on a recent trace.

Comment 8 by dskiba@chromium.org, May 30 2018

Labels: Performance-Startup
Status: Available (was: Untriaged)
Cc: mheikal@chromium.org
mheikal: have you seen this in recent traces?
We do now also have uma metrics for startup, but it would probably be hard for small changes here to show up there.
Cc: -roc...@chromium.org rockot@google.com

Sign in to add a comment