Last Comment Bug 736602 - Change inactive tab timer clamp setting to something higher than 1hz
: Change inactive tab timer clamp setting to something higher than 1hz
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: -- normal (vote)
: ---
Assigned To: Kevin Brosnan [:kbrosnan]
:
Mentors:
: 761731 (view as bug list)
Depends on: 763898
Blocks: background-data
  Show dependency treegraph
 
Reported: 2012-03-16 14:21 PDT by Mark Finkle (:mfinkle) (use needinfo?)
Modified: 2016-05-09 07:41 PDT (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed
+


Attachments
patch to increase the timeout to 15m (962 bytes, patch)
2012-06-11 17:02 PDT, Kevin Brosnan [:kbrosnan]
no flags Details | Diff | Review
a patch with some code (810 bytes, patch)
2012-06-11 17:41 PDT, Kevin Brosnan [:kbrosnan]
mark.finkle: review+
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Review
follow up to disable a test that times out (853 bytes, patch)
2012-06-11 20:38 PDT, Brad Lassey [:blassey] (use needinfo?)
blassey.bugs: review-
blassey.bugs: approval‑mozilla‑aurora-
blassey.bugs: approval‑mozilla‑beta-
Details | Diff | Review
patch to change pref for tests (821 bytes, patch)
2012-06-11 22:06 PDT, Brad Lassey [:blassey] (use needinfo?)
mark.finkle: review+
blassey.bugs: approval‑mozilla‑aurora+
blassey.bugs: approval‑mozilla‑beta+
Details | Diff | Review

Description Mark Finkle (:mfinkle) (use needinfo?) 2012-03-16 14:21:07 PDT
Inactive tabs clamp the timers to 1hz. We could clamp them higher and save some battery life. Suspend forever is not an option, so we need to pick a "high" value.

What value? 1 day?

The pref is "dom.min_background_timeout_value" (see bug 633421)
Comment 1 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-19 09:56:03 PDT
We'd like to get some data on power usage versus clamping frequency. The A-team is working on power monitoring solutions.
Comment 2 Mark Finkle (:mfinkle) (use needinfo?) 2012-05-31 21:39:06 PDT
For the record, I have no issue with bumping this value up, but I do not want to use the pref to disable timers completely. Note that the value affects any tab that is not the selected tab when Firefox is in the foreground and all tabs when Firefox is in the background.

I think there is a bug about disabling timers, JS and events after a period of being in the background built into the platform. I think that's a better approach and I don't want to use some front-end hacks to simulate that either.

We should also provide a way for users to allow pages to request running in the background.

Again, what value should we use? I see no harm in bumping the threshold to anything in the 10 to 30 second range. Maybe up to 60 seconds.
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 11:49:33 PDT
Let's test with a 15min throttle. A test page can be found here:
http://people.mozilla.org/~kgupta/bug/761731.html
Comment 4 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 11:50:28 PDT
*** Bug 761731 has been marked as a duplicate of this bug. ***
Comment 5 Kevin Brosnan [:kbrosnan] 2012-06-11 17:02:27 PDT
Created attachment 632069 [details] [diff] [review]
patch to increase the timeout to 15m
Comment 6 microrffr 2012-06-11 17:27:52 PDT
Comment on attachment 632069 [details] [diff] [review]
patch to increase the timeout to 15m

Review of attachment 632069 [details] [diff] [review]:
-----------------------------------------------------------------

Doesn't this just add an empty line?
Comment 7 Kevin Brosnan [:kbrosnan] 2012-06-11 17:34:58 PDT
Comment on attachment 632069 [details] [diff] [review]
patch to increase the timeout to 15m

Doh qupdate why do you hate me.
Comment 8 Kevin Brosnan [:kbrosnan] 2012-06-11 17:41:37 PDT
Created attachment 632085 [details] [diff] [review]
a patch with some code
Comment 9 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 18:06:58 PDT
Comment on attachment 632085 [details] [diff] [review]
a patch with some code

I assume this has a noticeable effect on the test file
Comment 10 Alex Keybl [:akeybl] 2012-06-11 18:44:08 PDT
Comment on attachment 632085 [details] [diff] [review]
a patch with some code

[Triage Comment]
Approving for Aurora and Beta in preparation for the B7 go to build. We can also test in QA with tinderbox builds in the morning.
Comment 12 Brad Lassey [:blassey] (use needinfo?) 2012-06-11 20:38:53 PDT
Created attachment 632118 [details] [diff] [review]
follow up to disable a test that times out
Comment 13 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 21:35:23 PDT
Might be better to just force the pref back to normal for tests:
http://mxr.mozilla.org/mozilla-central/source/build/automation.py.in#309
Comment 14 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 21:55:16 PDT
Comment on attachment 632118 [details] [diff] [review]
follow up to disable a test that times out

I'm OK with disabling the test in the short-term, but I think we need to reset the timeout pref for mochitests using the link I posted.
Comment 15 Matt Brubeck (:mbrubeck) 2012-06-11 21:56:02 PDT
Comment on attachment 632118 [details] [diff] [review]
follow up to disable a test that times out

[Approval Request Comment]
Risk to taking this patch (and alternatives if risky): Android-only test-only change to silence a failing test.

String or UUID changes made by this patch: None.
Comment 16 Brad Lassey [:blassey] (use needinfo?) 2012-06-11 22:06:05 PDT
Created attachment 632134 [details] [diff] [review]
patch to change pref for tests
Comment 17 Mark Finkle (:mfinkle) (use needinfo?) 2012-06-11 22:14:43 PDT
Comment on attachment 632134 [details] [diff] [review]
patch to change pref for tests

I think this method is preferred
Comment 19 Brad Lassey [:blassey] (use needinfo?) 2012-06-12 12:13:47 PDT
Comment on attachment 632134 [details] [diff] [review]
patch to change pref for tests

[Triage Comment]

Note You need to log in before you can comment on or make changes to this bug.