This project tries improve users' experience when they open large collections of tabs in the background while continuing to work in another foreground tab, so a user's experience with foreground tab is not affected by too many tabs being opened in the background.
Design doc:
https://docs.google.com/document/d/1_CS5kcY00CE3pzDTtW5Ny221gWfk4mFXYGiezoYSCBI/
Now TabManager has the basic capability of controlling background tabs' loading. Current behavior is to just load 1 background tab at a time and start to load the next background tab when a previous one finishes loading. We will need to improve it. Here I list a few ideas. We can definitely add more here.
1. Switch to use the tab done loading signal when it is ready.
2. Try to set the favicon and title from history service if a tab's navigation is delayed.
3. Support treating URLs differently. For example, always delay chrome:// and NTP tabs. Only load them when visible.
4. Support multiple tab loading modes. For example, under memory pressure, TabManager will defer all pending loads (none will load unless foregrounded by the user) until memory pressure has passed.
5. Timeout support. We cannot wait for the page loading forever if the page gets stuck somehow, We will need a timeout to continue loading the next page.
6. Support "loading slots". Limit the number of tabs that can load simultaneously, deferring others until loading slots are free. We can set current number of slots to be 1, i.e., only 1 background tab is loading. But we could relax this easily if needed with loading slots.
7. Configurable by user. This allows power user to disable this feature.
I am looking at how to set icons and titles. But I am not sure if we should set it based on information from history service. The background tabs already have a loading circle and text "Loading..." on the tab. Would changing the UI require any permission?
I attached a screenshot of what it currently looks like with staggered background tab opening.
Comment 1 by zh...@chromium.org
, Jun 7 2017