TaskManager support for Back/Forward Cache pages

31 views
Skip to first unread message

Johann Koenig

unread,
May 20, 2021, 3:14:16 AM5/20/21
to bfcac...@chromium.org, afa...@chromium.org
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

What is the preferred behavior? Other ideas include a popup or tooltip describing BFCache, but I'm not sure if there are any existing examples to reference.

Screenshot:
IDP_NEW_STRING.png

Fergal Daly

unread,
May 20, 2021, 3:25:50 AM5/20/21
to Johann Koenig, bfcache-dev, afa...@chromium.org
On Thu, 20 May 2021 at 16:14, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

Also, should it be displayed differently? E.g. subframes are labelled as such, perhaps bfcached frames should be labelled too,

F
 

What is the preferred behavior? Other ideas include a popup or tooltip describing BFCache, but I'm not sure if there are any existing examples to reference.

Screenshot:
IDP_NEW_STRING.png

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAE%3DFoMSMp-qxKWoDjv%2BfUEsCyrdsxE701p5jDmX5xDD3CGJ2YQ%40mail.gmail.com.

Kouhei Ueno

unread,
May 20, 2021, 3:33:31 AM5/20/21
to Fergal Daly, Johann Koenig, bfcache-dev, afa...@chromium.org
On Thu, May 20, 2021 at 4:25 PM 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:


On Thu, 20 May 2021 at 16:14, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

Also, should it be displayed differently? E.g. subframes are labelled as such, perhaps bfcached frames should be labelled too,

We are already labelling as such. "Back/Forward Cache Tab: ...".
 
F
 

What is the preferred behavior? Other ideas include a popup or tooltip describing BFCache, but I'm not sure if there are any existing examples to reference.

Screenshot:
IDP_NEW_STRING.png

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAE%3DFoMSMp-qxKWoDjv%2BfUEsCyrdsxE701p5jDmX5xDD3CGJ2YQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.

Fergal Daly

unread,
May 20, 2021, 3:48:48 AM5/20/21
to Kouhei Ueno, Johann Koenig, bfcache-dev, afa...@chromium.org
On Thu, 20 May 2021 at 16:33, Kouhei Ueno <kou...@google.com> wrote:


On Thu, May 20, 2021 at 4:25 PM 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:


On Thu, 20 May 2021 at 16:14, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

Also, should it be displayed differently? E.g. subframes are labelled as such, perhaps bfcached frames should be labelled too,

We are already labelling as such. "Back/Forward Cache Tab: ...".

Oh cool, although I think that wording is a bit odd, since it's not a tab, maybe "Back/Forward Cached Page/Subframe",

F

Alexander Timin

unread,
May 20, 2021, 11:15:12 AM5/20/21
to Fergal Daly, Kouhei Ueno, Johann Koenig, bfcache-dev, afa...@chromium.org
Thanks for starting the discussion and the screenshots — they are quite helpful!
One particular case that is interesting is the case when an active page and a bfcached page will share the process (which will happen quite often as we are using the same process on same-site navigation).

On Thu, 20 May 2021 at 08:48, 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:
On Thu, 20 May 2021 at 16:33, Kouhei Ueno <kou...@google.com> wrote:


On Thu, May 20, 2021 at 4:25 PM 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:


On Thu, 20 May 2021 at 16:14, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

Also, should it be displayed differently? E.g. subframes are labelled as such, perhaps bfcached frames should be labelled too,

We are already labelling as such. "Back/Forward Cache Tab: ...".

Oh cool, although I think that wording is a bit odd, since it's not a tab, maybe "Back/Forward Cached Page/Subframe",

+1 to using "page" instead of "tab" here (as the actual tab stays the same).
 
F
 
 
F
 

What is the preferred behavior? Other ideas include a popup or tooltip describing BFCache, but I'm not sure if there are any existing examples to reference.

Screenshot:
IDP_NEW_STRING.png

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAE%3DFoMSMp-qxKWoDjv%2BfUEsCyrdsxE701p5jDmX5xDD3CGJ2YQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAAozHLkNhN__hy5pXaWiXf9ku-wHdHHyntC9Yr69i_9XH-8iHw%40mail.gmail.com.


--
kouhei

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.

Kouhei Ueno

unread,
May 20, 2021, 11:16:45 AM5/20/21
to Alexander Timin, Fergal Daly, Johann Koenig, bfcache-dev, afa...@chromium.org
On Fri, May 21, 2021 at 12:15 AM Alexander Timin <alt...@chromium.org> wrote:
Thanks for starting the discussion and the screenshots — they are quite helpful!
One particular case that is interesting is the case when an active page and a bfcached page will share the process (which will happen quite often as we are using the same process on same-site navigation).

In that case we simply will have two distinct rows - one for the bfcached page and one for the active tab.


--
kouhei

Ahmed Fakhry

unread,
May 20, 2021, 11:23:46 AM5/20/21
to Kouhei Ueno, Charlie Reis, Avi Drissman, Alexander Timin, Fergal Daly, Johann Koenig, bfcache-dev, afa...@chromium.org
+1 to naming them differently.

I'm not sure what the preferred behavior for double-clicking on a BFCache row should be. If there is a tab associated with it like you said, then it's probably fine to activate it.

Avi Drissman

unread,
May 20, 2021, 11:29:28 AM5/20/21
to Ahmed Fakhry, Kouhei Ueno, Charlie Reis, Alexander Timin, Fergal Daly, Johann Koenig, bfcache-dev, afa...@chromium.org
Are we naming those entries differently? If we don't, then I'm afraid users are going to be concerned that pages are shown there that aren't visible. "Cached tab:"?

Johann Koenig

unread,
May 20, 2021, 6:55:38 PM5/20/21
to Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Charlie Reis, Alexander Timin, Fergal Daly, bfcache-dev, afa...@chromium.org
Thanks for the discussion! It sounds like the consensus is:

- Rename the current "Back/Forward Cache Tab:" to "Back/Forward Cached Page:"
- Keep the double click behavior (switch to the tab the page is associated with)

Is there anything else that needs to be addressed before this can be merged?

On Fri, May 21, 2021 at 12:29 AM Avi Drissman <a...@google.com> wrote:
Are we naming those entries differently? If we don't, then I'm afraid users are going to be concerned that pages are shown there that aren't visible. "Cached tab:"?

Yes, they are currently labeled as "Back/Forward Cache Tab", but per discussion Tab will become Page.
 
On Thu, May 20, 2021 at 11:23 AM Ahmed Fakhry <afa...@google.com> wrote:
+1 to naming them differently.

I'm not sure what the preferred behavior for double-clicking on a BFCache row should be. If there is a tab associated with it like you said, then it's probably fine to activate it.

That sounds reasonable. It makes it easy to check which tab the cached page is associated with.
 

On Thu, May 20, 2021 at 8:16 AM Kouhei Ueno <kou...@google.com> wrote:


On Fri, May 21, 2021 at 12:15 AM Alexander Timin <alt...@chromium.org> wrote:
Thanks for starting the discussion and the screenshots — they are quite helpful!
One particular case that is interesting is the case when an active page and a bfcached page will share the process (which will happen quite often as we are using the same process on same-site navigation).

In that case we simply will have two distinct rows - one for the bfcached page and one for the active tab.

Yes, this is the same as the cross-site behavior. Since the Task Manager is creating new entries based on RenderFrameHosts, anything that creates a RFH for the new page and caches the previous one will show up in the same way.
 
On Thu, 20 May 2021 at 08:48, 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:
On Thu, 20 May 2021 at 16:33, Kouhei Ueno <kou...@google.com> wrote:


On Thu, May 20, 2021 at 4:25 PM 'Fergal Daly' via bfcache-dev <bfcac...@chromium.org> wrote:


On Thu, 20 May 2021 at 16:14, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Hi Ahmed,

Since you are the OWNER for chrome/browser/task_manager, I was hoping to get your feedback on this.

For crbug.com/992861 we would like to include pages in the Back/Forward cache in Task Manager. Pending change: https://chromium-review.googlesource.com/c/chromium/src/+/2899822

For background, Back/Forward Cache keeps RenderFrameHosts alive when you navigate away from them. If you return, it makes for a much faster loading experience. They are associated with the same WebContents, which makes some things tricky (like retrieving the Title or Favicon for the cached page).

Currently they are not accounted for in the Task Manager. The change above fixes that, but now we have extra entries in the Task Manager and we are not sure what the behavior should be when double clicking on an entry. Currently the change does not override Activate(), so it will switch to the tab that the entry is associated with. If Activate() is overridden with an empty function, double clicking will not have any effect.

Also, should it be displayed differently? E.g. subframes are labelled as such, perhaps bfcached frames should be labelled too,

We are already labelling as such. "Back/Forward Cache Tab: ...".

Oh cool, although I think that wording is a bit odd, since it's not a tab, maybe "Back/Forward Cached Page/Subframe",

+1 to using "page" instead of "tab" here (as the actual tab stays the same).

Sure thing, will update to "Back/Forward Cached Page"

Charlie Reis

unread,
May 20, 2021, 11:56:27 PM5/20/21
to Johann Koenig, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, Fergal Daly, bfcache-dev, afa...@chromium.org
Thanks!  I'm excited that these rows will be shown in the task manager.

I like both "Back/Forward Cached Page" and activating the tab on double click.  Would we say "Back/Forward Cached Subframe" if it's an OOPIF in the bfcache?

One other question: the screenshot seems to indicate that the full URL is shown on the row?  For Subframe processes, we currently show the SiteInstance's site URL instead, IIRC.  Would you want to do that to be consistent and have a shorter string to display?  (One caveat: I may have to change that value as part of the SiteInstanceGroup work in https://crbug.com/1195535, but whatever the new approach is could be applied consistently for subframes and bfcache.)

Charlie

Johann Koenig

unread,
May 21, 2021, 3:26:24 AM5/21/21
to Charlie Reis, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, Fergal Daly, bfcache-dev, afa...@chromium.org
So for Subframes there is a bit of a gap:
  > Back/Forward Cached Page: http://a.com:35019/iframe_cross_site.html
  > Back/Forward Cached Page: http://b.com:35019/title1.html
  > Back/Forward Cached Page: http://c.com:35019/title1.html

b.com and c.com should be, maybe, Back/Forward Cached Subframe:? Working on that now. Subframes also have this handy bar that visually attaches them to the parent frame. Having that for the BFcache pages might be nice.

Regarding SiteInstance URL vs the current one, the SiteInstance URL is just the TLD+1 and protocol. Since the pages were not as visibly attached to the active pages as subframes are, I thought having the full URL would make it easier for users to understand where they were coming from. However, if they look more like the subframes and have a bar attaching them to the active tab, then it makes more sense to use just the SiteInstance URL.

Fergal Daly

unread,
May 21, 2021, 4:35:10 AM5/21/21
to Johann Koenig, Charlie Reis, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, bfcache-dev, afa...@chromium.org
On Fri, 21 May 2021 at 16:26, Johann Koenig <johann...@google.com> wrote:
So for Subframes there is a bit of a gap:
  > Back/Forward Cached Page: http://a.com:35019/iframe_cross_site.html
  > Back/Forward Cached Page: http://b.com:35019/title1.html
  > Back/Forward Cached Page: http://c.com:35019/title1.html

b.com and c.com should be, maybe, Back/Forward Cached Subframe:? Working on that now. Subframes also have this handy bar that visually attaches them to the parent frame. Having that for the BFcache pages might be nice.

Regarding SiteInstance URL vs the current one, the SiteInstance URL is just the TLD+1 and protocol. Since the pages were not as visibly attached to the active pages as subframes are, I thought having the full URL would make it easier for users to understand where they were coming from. However, if they look more like the subframes and have a bar attaching them to the active tab, then it makes more sense to use just the SiteInstance URL.

Maybe this is what you meant but I would expect subframes of a bfcached page to be attached to the bfcached page not the active tab,

F

Charlie Reis

unread,
May 21, 2021, 1:25:34 PM5/21/21
to Fergal Daly, Johann Koenig, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, bfcache-dev, afa...@chromium.org, Chromium Site Isolation
[Moving to my chromium.org address since this is already on bfcache-dev, and adding site-isolation-dev]

Thanks, but I should clarify something that probably isn't clear: the task manager doesn't show a subframe row for every frame in a page, or even every OOPIF.  It shows one subframe row for each SiteInstance containing OOPIFs in a page.  Thus, a page like A(B1, B2) will show:
Tab: A_Title
Subframe: B_SiteURL

It will not show:
Tab: A_Title
Subframe: B1_URL
Subframe: B2_URL

Is the bfcache logic behaving similarly, or will it attempt to show every subframe and/or OOPIF?  That's one reason I asked about the URL vs site URL, since not every URL will be shown.

Thanks,
Charlie

Alex Moshchuk

unread,
May 21, 2021, 2:18:46 PM5/21/21
to Charlie Reis, Fergal Daly, Johann Koenig, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, bfcache-dev, afa...@chromium.org, Chromium Site Isolation
On Fri, May 21, 2021 at 10:25 AM Charlie Reis <cr...@chromium.org> wrote:
[Moving to my chromium.org address since this is already on bfcache-dev, and adding site-isolation-dev]

Thanks, but I should clarify something that probably isn't clear: the task manager doesn't show a subframe row for every frame in a page, or even every OOPIF.  It shows one subframe row for each SiteInstance containing OOPIFs in a page.  Thus, a page like A(B1, B2) will show:
Tab: A_Title
Subframe: B_SiteURL

It will not show:
Tab: A_Title
Subframe: B1_URL
Subframe: B2_URL

Is the bfcache logic behaving similarly, or will it attempt to show every subframe and/or OOPIF?  That's one reason I asked about the URL vs site URL, since not every URL will be shown.

Whatever we end up doing for subframes, it'd be good if that's consistent in the bfcached and normal cases. : )  My recollection is that adding specific URLs may involve quite a bit of plumbing and may become overwhelming for pages with lots of iframes, so I'd vote for sticking with per-site grouping.  (We've had reports that even the current scheme results in too many subframe processes polluting the task manager.)  We should also consider cases where same-site OOPIFs from unrelated tabs share a process, which is quite common on desktop.  I think now some of these OOPIFs may be on regular and some on bfcached pages in the same process, though they should still have separate rows so the new labels should be accurate.

Also, presumably if you double-click on an OOPIF in a bfcached page, that should also focus the tab with the bfcached page?  Let's make sure this case is also covered.

+1 that the plan overall sounds reasonable. 

Johann Koenig

unread,
May 25, 2021, 2:54:30 AM5/25/21
to Alex Moshchuk, Charlie Reis, Fergal Daly, Avi Drissman, Ahmed Fakhry, Kouhei Ueno, Alexander Timin, bfcache-dev, afa...@chromium.org, Chromium Site Isolation
Regarding grouping, yes my goal is to have the cached subframes together under the cached main page. I was wrong about a little bar visually attaching the subframes to the main page. Looking at a current Task Manager:
Screen Shot 2021-05-25 at 15.42.39.png

I would expect navigating away from gmail would produce:
Tab: Example page
Back/Forward Cached Page: https://mail.google.com/
Back/Forward Cached Subframe: https://google.com/
Back/Forward Cached Subframe: https://accounts.google.com/
Back/Forward Cached Subframe: https://accounts.google.com/
Back/Forward Cached Subframe: https://accounts.google.com/
Back/Forward Cached Subframe: https://accounts.google.com/

that is, I would expect it to replicate the view of when the cached page was active.

However, I've run into a bit of an issue where I'm having trouble with the frame tree. Thanks to Charlie, I'm looking around the FrameTreeNode code to see if I can maintain the structure.

If not, how comfortable would people be with clumping all cached pages under:
Back/Forward Cached Resource:
it seems less than ideal to me.
Reply all
Reply to author
Forward
0 new messages