Closed Bug 592751 Opened 14 years ago Closed 14 years ago

Open a blank tab when the device is idle, to force the active tab into the background

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: azakai, Assigned: azakai)

References

Details

We do less work on certain things when in a background tab - for example, we do not draw changes, and we should be pausing animation timers as well. So, if Fennec would browse to a new tab with about:blank when the device is idle (or maybe shuts off the screen), we could save power that way. We'd remove the about:blank tab when we become active again.

(In theory we could browse all open tabs to about:blank - forcing them into the bfcache - and save even more (timeouts, for example), but the cost would be

* Time to reload from bfcache
* Losing the forward history
* Possibly losing DOM info if the bfcache does not preserve everything exactly
* Maybe mess up stuff with timeouts that the user expected to continue running
)
I have been told the new tab would show up in the history. So that's not good.

We may consider using the nsDocument API for marking a tab as active/inactive directly - marking all tabs as inactive when the display is idle, say.
tracking-fennec: --- → ?
alon, can you work with UX to talk through the trade offs here.  By doing what you are suggesting means that background tabs will not run JS... and that means sites f.e. that play music will stop playing.  not sure what the right trade offs are off hand.
not blocking fennec without a clear path as to what to do.
tracking-fennec: ? → 2.0-
To be honest the more I think about this the less I like the idea. I'm not sure I am still in favor of it.
tracking-fennec: 2.0- → ---
I retract this idea.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.