New issue
Advanced search Search tips

Issue 854272 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Restored tabs and tabs opened in the background are frozen/discarded immediately

Project Member Reported by fdoray@chromium.org, Jun 19 2018

Issue description

A tab that doesn't start visible has an initial LifecycleUnit::GetLastVisibleTime() equal to zero, which makes it immediately eligible for proactive freezing and discarding. This is problematic, because it means that with the ProactiveTabFreezeAndDiscard experiment, restored tabs and tabs opened in the background effectively do not load until they are accessed. 

We need to fix these 2 issues:
- When a tab is opened in the background, we should use its opening time instead of a zero TimeTicks() as its last active time for proactive freeze and discard.
- When a tab is restored, we should use a restored last active time.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6

commit df35166fd2ae545e9d31701a2d9b9cb286dc5ad6
Author: Francois Doray <fdoray@chromium.org>
Date: Tue Jun 19 19:47:41 2018

RC: Use creation time as last active time for tabs open in the background.

Previously, "zero" was used as the last active time for tabs open in
the background, which made them immediately eligible for proactive
freeze and discard. With this CL, their creation time is used as the
last active time, which will prevent them from being proactively frozen
or discarded for at least 10 minutes after creation (note: except
when the number of tabs is considered excessive, see
tab_manager_features.cc).

Bug:  854272 
Change-Id: I5398b24fadbd073bd224e2a9e98c8ae610b26e92
Reviewed-on: https://chromium-review.googlesource.com/1106612
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568574}
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/lifecycle_unit.h
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/lifecycle_unit_base.h
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/tab_manager.cc
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/test_lifecycle_unit.cc
[modify] https://crrev.com/df35166fd2ae545e9d31701a2d9b9cb286dc5ad6/chrome/browser/resource_coordinator/test_lifecycle_unit.h

Comment 2 by fdoray@chromium.org, Jun 21 2018

Status: Fixed (was: Started)

Sign in to add a comment