Closed
Bug 1377766
Opened 7 years ago
Closed 7 years ago
Enable budget throttling by default
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: farre, Assigned: farre)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
(deleted),
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•7 years ago
|
||
As expected there are loads of oranges if this is turned on:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7161c02e0c11902e3084c5b31d60959454b70bd8&selectedJob=118414848
Haven't checked all (there are 500+ failures), but those I did check were of the test timed out variety.
Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
(P2 only because we're going to try to ship it soon but it's not a super-critical crasher or something like that :)
Priority: -- → P2
Assignee | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Are there plans to use different timeout values on Android given that currently background timeouts are much more heavily throttled there? (https://dxr.mozilla.org/mozilla-central/rev/c97190c389c4cfef20fe55b4bacade95a36ae6ef/mobile/android/app/mobile.js#741)
Updated•7 years ago
|
Assignee | ||
Comment 6•7 years ago
|
||
Attachment #8916574 -
Flags: review?(bkelly)
Updated•7 years ago
|
Attachment #8916574 -
Flags: review?(bkelly) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dbcd58f04e4f
Enable budget throttling by default. r=bkelly
Keywords: checkin-needed
Comment 8•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 9•7 years ago
|
||
Key word "perf"?
Comment 10•7 years ago
|
||
I've started documenting this by adding a section to the Page Visibility API landing page to explain the policies we have in place to mitigate perceived background performance problems:
https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#Policies_in_place_to_aid_background_page_performance
I thought this seemed like OK place to put it.
To help with this, can you:
1. Let me know if you think this place is ok.
2. Let me know what the effects of Budget based background timeout throttling are — do we follow the same policy as Chrome, e.g. https://developers.google.com/web/updates/2017/03/background_tabs#budget-based_background_timer_throttling , or something else?
Once I know this, I'll fill out that section, and add a note to the Fx58 rel notes.
Thanks!
Flags: needinfo?(afarre)
Assignee | ||
Comment 11•7 years ago
|
||
It looks like the perfect place.
We follow a /similar/ policy, matching all bullets from https://developers.google.com/web/updates/2017/03/background_tabs#budget-based_background_timer_throttling we behave as follows:
* Windows in each background tab in the background has a time budget in milliseconds
Not sure if this differs in that Chrome has per tab where we have per window. Our budget is in milliseconds with a max and a min value +50 ms, -150 ms respectively.
* Windows are subjected to throttling after 30 seconds, mainly because we re-use the throttling delay from Bug 1355311.
This has been manually tested, but is a bit hand-wavey.
* Timer tasks are indeed only allowed when the budget is non-negative.
* When a timer has executed, the execution time is deducted from the budget from the window where the timeout gets called from.
* Budget regenerates at the same rate, 10 ms per second.
The exceptions from throttling are the same. We also add IndexedDB to the list of exceptions, mainly due to https://bugs.chromium.org/p/chromium/issues/detail?id=675372, but now when checking Chrome seems to throttle even when there are active IndexedDB transactions. Also, we differ from Chrome in that Chrome stops throttling pages with audio, and will not start throttling again when audio stops playing.
For the curious here's the toy I wrote and put here: https://farre.github.io/web-tools/load/ The UI is a bit messy, but just hit the 'Run Test' button and wait to see the throttling behaviour of the UA.
Flags: needinfo?(afarre)
Assignee | ||
Comment 12•7 years ago
|
||
Sorry, that Chromium issue regarding IndexedDB is not relevant. Regardless, I'm fairly certain that Chrome also used to limit throttling of IndexedDB to once per second, but not with budget. Will check this some more tomorrow.
Comment 13•7 years ago
|
||
(In reply to Worcester12345 from comment #9)
> Key word "perf"?
So this wasn't a performance fixing bug then?
Comment 14•7 years ago
|
||
Cool, thanks a lot for the notes Andreas! I have filled in those details on the page mentioned:
I have also added a note to the Fx 58 rel notes:
https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#Policies_in_place_to_aid_background_page_performance
https://developer.mozilla.org/en-US/Firefox/Releases/58#DOM
Please let me know if you think the section needs any more information, or fixes.
Flags: needinfo?(afarre)
Updated•7 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•