WebExtension API to 'warm up' a tab
Categories
(WebExtensions :: Frontend, enhancement, P5)
Tracking
(firefox57 wontfix, firefox79 fixed)
People
(Reporter: bugzilla, Assigned: aria)
Details
(Keywords: dev-doc-complete, Whiteboard: [design-decision-approved])
Attachments
(1 file)
Bug 1385453 allows 'warming up' the tabs that are hovered, giving a perceived performance improvement when the user clicks a tab. It would be nice for WebExtensions that implement alternative tab switchers (e.g. Tree Style Tabs) to be able to benefit from this improvement. This could be done by adding an extra property to updateProperties of browser.tabs.update, e.g. 'hovered', 'warmed', or 'about-to-be-active' that would trigger the same behaviour as hovering a built-in tab.
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
tabbrowser.xml also calls SessionStore.speculativeConnectOnTabHover when a tab is hovered (for restored tabs). So the API call should probably call that as well as warmupTab and any other non-UI stuff that happens when a tab is hovered.
Comment 2•6 years ago
|
||
Hi Paul, this has been added to the agenda for the February 27 WebExtensions APIs triage. Would you be able to join us? Here’s a quick overview of what to expect at the triage: * We normally spend 5 minutes per bug * The more information in the bug, the better * The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details Relevant Links: * Wiki for the meeting: https://wiki.mozilla.org/WebExtensions/Triage#Next_Meeting * Meeting agenda: https://docs.google.com/document/d/1Jd50z5FMuS6tA6BMiCkpemAMeE5CtR_NboA-EdYI7jE/edit# * Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
Comment 3•6 years ago
|
||
We're approving tab 'warm ups,' and Kris will comment with some implementation suggestions.
Comment 4•6 years ago
|
||
We approved this, but with the caveat that there should be a warmup function rather than a flag.
Updated•6 years ago
|
Hi, I wrote a patch but I’d like guidance on what type of test I can write and how to check that the tab has been effectively warmed up, since we can’t know that with the WebExtensions API.
Updated•4 years ago
|
Comment 8•4 years ago
|
||
I'm a touch tight on time this week, lets see if someone familiar with tab warmup has a quick answer on how to test for it.
Comment 9•4 years ago
|
||
I can't really comment on where the test should live and whatnot - I'm not familiar with general policies on web extension API testing. But you can tell if a tab is warm or being warmed or not by checking the renderLayers
property on the browser object. For example, in the browser toolbox: gBrowser.tabs[0].linkedBrowser.renderLayers
will tell you if your first tab is warming up / warmed up / displayed.
However, looking at your patch, I don't think that should work...? It should be gBrowser.warmupTab
, not gBrowser.warmUp
.
Comment 10•4 years ago
|
||
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b32011328f0 Add WebExtensions API to “warm up” a tab r=mixedpuppy
Comment 11•4 years ago
•
|
||
Backed out for perma failures.
Failure logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302649386&repo=autoland&lineNumber=14032
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302649363&repo=autoland&lineNumber=1362
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302650153&repo=autoland&lineNumber=1568
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302651140&repo=autoland&lineNumber=8780
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=302651484&repo=autoland&lineNumber=30200
Backout: https://hg.mozilla.org/integration/autoland/rev/1e2b59d2306afe37d3bce4b129b8479aa1635fdb
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9855eb03a9f1 Add WebExtensions API to “warm up” a tab r=mixedpuppy
Comment 13•4 years ago
|
||
Backed out for failures on test_ext_all_apis.html
backout: https://hg.mozilla.org/integration/autoland/rev/98fd4fe746ea5f38a26de5bc5b15cd467b6e883f
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303720052&repo=autoland&lineNumber=1604
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - TEST-PASS | browser/components/extensions/test/mochitest/test_ext_all_apis.html | content script APIs
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Buffered messages logged at 03:18:36
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task | Leaving test test_enumerate_content_script_apis
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task | Entering test test_enumerate_background_script_apis
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Extension loaded
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - Buffered messages finished
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/mochitest/test_ext_all_apis.html | background script APIs - Structures begin differing at:
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - got[99] = "browser.tabs.warmup"
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - expected[99] = "browser.test.assertEq"
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO -
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - SimpleTest.isDeeply@SimpleTest/SimpleTest.js:1879:16
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - test_enumerate_background_script_apis@browser/components/extensions/test/mochitest/test_ext_all_apis.js:178:11
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - asyncnextTick/<@SimpleTest/SimpleTest.js:2080:34
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - asyncnextTick@SimpleTest/SimpleTest.js:2105:11
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:788:41
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - add_task@SimpleTest/SimpleTest.js:2035:17
[task 2020-05-26T03:18:37.235Z] 03:18:37 INFO - @browser/components/extensions/test/mochitest/test_ext_all_apis.js:143:9
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - add_task | Leaving test test_enumerate_background_script_apis
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT heapAllocated not supported in this build configuration.
[task 2020-05-26T03:18:37.236Z] 03:18:37 INFO - GECKO(1258) | MEMORY STAT | vsize 130550484MB | residentFast 398MB
There are also other browser-chrome failures such as:
- toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_getCurrent.js | Test timed out -
- browser/components/extensions/test/browser/browser_ext_tabs_cookieStoreId_private.js | Test timed out -
- browser/extensions/report-site-issue/test/browser/browser_report_site_issue.js | Test timed out -
and many others.
Comment 14•4 years ago
|
||
Pushed by cbrindusan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18a94269c57c Add WebExtensions API to “warm up” a tab r=mixedpuppy
Comment 15•4 years ago
|
||
bugherder |
Comment 16•4 years ago
|
||
I've added a page for this API: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/warmup .
Compat data is merged but not deployed until tomorrow.
Please let me know if this covers it.
Comment 17•4 years ago
|
||
Thanks Will, I replaced the use of "discard" on that page, to avoid confusion with the unrelated tabs.discard
method, and added a clarifying sentence about this not being required, just a performance optimization. Please check if my edit fits the article and MDN.
Updated•4 years ago
|
Description
•