Firefox/Projects/Per Tab Network Prioritization
Sprint lead: zpao
Sprinters: zpao, limi
QA Contact: whimboo
- We want to do some network prioritization such that the tab / window that you are currently using have higher network priority than the ones you aren't using.
The goal is to optimize tab loading and performance on startup.
We propose to do this in two stages:
- Firefox 3.6: A simple enhancement where we assign priorities to the network loading of the different tabs. This should give us a quick win and make the initial page load of the focused tab complete earlier.
- Firefox 3.7: A more comprehensive enhancement to make it possible to load tabs in most-recently-used order, as well as possibly set a threshold for how many tabs get loaded at once. This should take care of the more extreme cases where people are opening 30+ tabs on restore.
Goals / Use Cases
- Make Firefox feel like it's starting up faster.
- While Firefox (or at least the tab / window being used) should become more immediately usable, I don't think total load time will be faster.
- Make current tab more responsive than background tabs.
Non-Goals in this iteration
The first iteration will be a simpler version, for the next iteration (3.7?) we should consider:
- MRU network prioritization.
- A threshold on how many tabs are loaded in parallel to control cpu/network load.
- Batch up these groups based on MRU order.
There are a couple ways we could do this:
- Put it all in tabbrowser.xml & browser.js & just jigger priorities directly.
- Put it in a new component (or whatever) that listens for TabSelect (and window select)
If possible, we also want to be able to have an interrupt give higher priority to a tab if you switch to it during the initial page load. E.g. if you switch to the unfocused window, the priorities mirror what was in the initial focused window had, and the now-unfocused window has its priorities downgraded.
Priorities range from 20 to -20 with -20 being the highest. There are 5 presets (highest, high, normal, low, lowest).
What To Do With Priorities
The general proposition here is as follows:
|Focused Tab||Unfocused Tab|
A visual way of looking at it —  indicates frontmost tab:
________ ________ ________ | Medium || [High] || Medium |
Unfocused (but visible) window:
_____ __________ _____ | Low || [Medium] || Low |
________ _______ ________ | Lowest || [Low] || Lowest |
- Limi's dev.apps.firefox thread (has some useful implementation insight from bz)