Re: Opt-in/opt-out of freezing via Origin Trial

32 views
Skip to first unread message

François Doray

unread,
Jun 19, 2019, 4:08:41 PM6/19/19
to chrome-catan, Rick Byers, Dave Tapuska, Jason Chase, experimen...@chromium.org


On Wed, Jun 19, 2019 at 4:05 PM François Doray <fdo...@google.com> wrote:
Hi Experimentation-Dev,

We have been experimenting with tab freezing on desktop for a few months. Data shows that it reduces CPU usage in background tabs by 20%, so we would like to ship it to Stable.

We know that freezing breaks some pages. We built heuristics to avoid freezing such pages. However, feedback on the Intent to Implement revealed that developers want to have the possibility to explicitly opt-out of freezing.

We plan to provide this capability via Origin Trials. The opt-in and opt-out Origin Trials are already defined in code. If any frame in a page specifies the PageLifecycleTransitionsOptOut trial, the page will not be frozen. If the main frame of a page specified the PageLifecycleTransitionsOptIn trial, the page will be frozen when backgrounded. Otherwise, our heuristics will be used to determine whether the page can be frozen.

Our goal is to add capabilities to the Web platform so that pages can provide all functionalities they provide today without needing to opt-out from freezing (e.g. we will allow service workers to update the title of frozen pages). As a result, the opt-in/opt-out Origin Trials will stop existing at some point.

If all of this makes sense, I'll go ahead and follow the steps at https://www.chromium.org/blink/origin-trials/running-an-origin-trial to get the Origin Trials added to the public console.

Thanks,

François

Rick Byers

unread,
Jun 20, 2019, 11:06:17 AM6/20/19
to François Doray, chrome-catan, Dave Tapuska, Jason Chase, experimen...@chromium.org
This sounds great to me. Since I think this is our first "reverse origin trial" we might have some logistics to figure out. For example, I'm guessing the normal trial duration is really too short. Jason, can you work with François to ensure there's a clear plan? I think it's fine that the warnings on the OT console may not be exactly appropriate etc., as long as we have the policies for this trial documented as being special somewhere and shared with blink-api-owners-discuss.

Rick

Jason Chase

unread,
Jun 20, 2019, 11:41:43 AM6/20/19
to experimentation-dev, fdo...@google.com, chrome...@google.com, dtap...@chromium.org
I also think this approach is reasonable, especially since in the past we've discussed (internally) using the origin trials infrastructure for opt-in/opt-out of intervention-style actions by the browser.

First, naming is hard, but I think we should avoid using the term "reverse origin trial". To me, that's the same as saying "an origin trial, but different", without naming what is different. I'm calling that out so we can hopefully prevent that term from being entrenched.

Second, this isn't the first novel use of the origin trial infrastructure. For Web Components V0 and PNaCl, we've setup trials to allow developers to extend the removal of a deprecated feature. Those have also been called "reverse origin trials", but are clearly not the same thing as we're discussing here. Hence my goal of getting the naming right.

As for the logistics, I'll work with François to sort out the details. In the past, we started this requirements doc (internal) to capture what would be different about a program intervention opt-in/opt-out, and the OT console could be changed to support that. Comments are welcome there. In any case, I'll prepare public documentation about this trial and share broadly.

Thanks,
Jason

Rick Byers

unread,
Jun 20, 2019, 1:42:28 PM6/20/19
to Jason Chase, experimentation-dev, François Doray, Dave Tapuska
[Dropping google internal chrome-catan list from this public thread, since it doesn't accept outside mail]

On Thu, Jun 20, 2019 at 11:41 AM Jason Chase <cha...@chromium.org> wrote:
I also think this approach is reasonable, especially since in the past we've discussed (internally) using the origin trials infrastructure for opt-in/opt-out of intervention-style actions by the browser.

First, naming is hard, but I think we should avoid using the term "reverse origin trial". To me, that's the same as saying "an origin trial, but different", without naming what is different. I'm calling that out so we can hopefully prevent that term from being entrenched.

Sorry, I agree it's confusing. Is there a better term for an origin trial that turns something off - i.e. one that's not really about temporarily experimenting with something new? Maybe just "deprecation origin trial"? Or looks like maybe you're using "opt-out origin trial" below?

Second, this isn't the first novel use of the origin trial infrastructure. For Web Components V0 and PNaCl, we've setup trials to allow developers to extend the removal of a deprecated feature. Those have also been called "reverse origin trials", but are clearly not the same thing as we're discussing here. Hence my goal of getting the naming right.

Ah, again I'm sorry I'm not up to speed - I hadn't realized those were already active. Great! Then we should just be able to rinse and repeat here.

As for the logistics, I'll work with François to sort out the details. In the past, we started this requirements doc (internal) to capture what would be different about a program intervention opt-in/opt-out, and the OT console could be changed to support that. Comments are welcome there. In any case, I'll prepare public documentation about this trial and share broadly.

Thanks,
Jason

On Thursday, June 20, 2019 at 11:06:17 AM UTC-4, Rick Byers wrote:
This sounds great to me. Since I think this is our first "reverse origin trial" we might have some logistics to figure out. For example, I'm guessing the normal trial duration is really too short. Jason, can you work with François to ensure there's a clear plan? I think it's fine that the warnings on the OT console may not be exactly appropriate etc., as long as we have the policies for this trial documented as being special somewhere and shared with blink-api-owners-discuss.

Rick

On Wed, Jun 19, 2019, 4:08 PM François Doray <fdo...@google.com> wrote:


On Wed, Jun 19, 2019 at 4:05 PM François Doray <fdo...@google.com> wrote:
Hi Experimentation-Dev,

We have been experimenting with tab freezing on desktop for a few months. Data shows that it reduces CPU usage in background tabs by 20%, so we would like to ship it to Stable.

We know that freezing breaks some pages. We built heuristics to avoid freezing such pages. However, feedback on the Intent to Implement revealed that developers want to have the possibility to explicitly opt-out of freezing.

We plan to provide this capability via Origin Trials. The opt-in and opt-out Origin Trials are already defined in code. If any frame in a page specifies the PageLifecycleTransitionsOptOut trial, the page will not be frozen. If the main frame of a page specified the PageLifecycleTransitionsOptIn trial, the page will be frozen when backgrounded. Otherwise, our heuristics will be used to determine whether the page can be frozen.

Our goal is to add capabilities to the Web platform so that pages can provide all functionalities they provide today without needing to opt-out from freezing (e.g. we will allow service workers to update the title of frozen pages). As a result, the opt-in/opt-out Origin Trials will stop existing at some point.

If all of this makes sense, I'll go ahead and follow the steps at https://www.chromium.org/blink/origin-trials/running-an-origin-trial to get the Origin Trials added to the public console.

Thanks,

François

--
You received this message because you are subscribed to the Google Groups "experimentation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/experimentation-dev/5f194af9-6efa-4db9-b06d-c8f52eb3e419%40chromium.org.
Reply all
Reply to author
Forward
0 new messages