Make the ResourceWatcher emit many resources instead of just one
Categories
(DevTools :: Framework, enhancement)
Tracking
(firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
(Whiteboard: dt-fission-m2-mvp)
Attachments
(3 files)
I suspect in bug 1620280 that the performance regression is related to the fact that we process JS Sources one by one.
Today, the ResourceWatcher.watch
will call the onAvailable, onUpdated and onDestroyed arguments once per resource.
But internaly, this class receives resources by bulk, an array of resources.
So that it would be great to also pass them to the frontend as a list.
It would help the frontend do bulk updates. It would also help control how bulk works in the ResourceWatcher instead of doing it differently in each individual panel.
In order to do that, we should first make it so that we ready resourceType
and targetFront
from the resource object instead of reading it from the argument of the on*** functions.
That's because we could pass resources of multiple types and distinct targets.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Here, I've tried to be especially careful about replacing return
by continue
in the added for..loops.
Assignee | ||
Comment 4•4 years ago
|
||
I might have expected some impact on DAMP, but it looks like these changes are not having any:
https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=fc5df93cd0766d30c361bc257650bd4b58e504b0&originalSignature=1910071&newSignature=1910071&framework=12&originalRevision=c813e24043b3ef263d4be561ad5625278b65c963
Assignee | ||
Comment 5•4 years ago
|
||
Just in case, another DAMP comparison, after a rebase, still no significant change:
https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=aec425758541da268a8b477f136db3541d2e63df&originalSignature=1910071&newSignature=1910071&framework=12&originalRevision=e8fcc299236423941f8480f0286ec3a4962df6f5
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Backed out for failures on browser_ext_devtools_network_targetSwitch.js
backout: https://hg.mozilla.org/integration/autoland/rev/ca131344e7fcf46f50e09bea63141d2578f18b7b
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315030609&repo=autoland&lineNumber=7730
[task 2020-09-07T17:41:47.991Z] 17:41:47 INFO - Console message: [JavaScript Error: "TypeError: can't access property "isTopLevel", targetFront is undefined" {file: "resource://gre/modules/ExtensionParent.jsm" line: 746}]
[task 2020-09-07T17:41:47.992Z] 17:41:47 INFO - Buffered messages logged at 17:35:42
[task 2020-09-07T17:41:47.994Z] 17:41:47 INFO - Console message: [JavaScript Error: "Unknown Collection "main/nimbus-desktop-experiments"" {file: "resource://services-settings/RemoteSettingsClient.jsm" line: 160}]
[task 2020-09-07T17:41:47.995Z] 17:41:47 INFO - UnknownCollectionError@resource://services-settings/RemoteSettingsClient.jsm:160:5
[task 2020-09-07T17:41:47.995Z] 17:41:47 INFO - sync@resource://services-settings/RemoteSettingsClient.jsm:470:13
[task 2020-09-07T17:41:47.995Z] 17:41:47 INFO -
[task 2020-09-07T17:41:47.995Z] 17:41:47 INFO - Buffered messages logged at 17:35:47
[task 2020-09-07T17:41:47.996Z] 17:41:47 INFO - Longer timeout required, waiting longer... Remaining timeouts: 3
[task 2020-09-07T17:41:47.996Z] 17:41:47 INFO - Buffered messages logged at 17:37:17
[task 2020-09-07T17:41:47.996Z] 17:41:47 INFO - Longer timeout required, waiting longer... Remaining timeouts: 2
[task 2020-09-07T17:41:47.997Z] 17:41:47 INFO - Buffered messages logged at 17:38:47
[task 2020-09-07T17:41:47.999Z] 17:41:47 INFO - Longer timeout required, waiting longer... Remaining timeouts: 1
[task 2020-09-07T17:41:48.000Z] 17:41:47 INFO - Buffered messages logged at 17:39:42
[task 2020-09-07T17:41:48.000Z] 17:41:48 INFO - Console message: [JavaScript Error: "1599500382645 addons.xpi ERROR System addon update list error Error: got node name: html, expected: updates" {file: "resource://gre/modules/Log.jsm" line: 723}]
[task 2020-09-07T17:41:48.000Z] 17:41:48 INFO - append@resource://gre/modules/Log.jsm:723:12
[task 2020-09-07T17:41:48.000Z] 17:41:48 INFO - log@resource://gre/modules/Log.jsm:379:16
[task 2020-09-07T17:41:48.000Z] 17:41:48 INFO - error@resource://gre/modules/Log.jsm:387:10
[task 2020-09-07T17:41:48.001Z] 17:41:48 INFO - updateSystemAddons/res<@resource://gre/modules/addons/XPIInstall.jsm:4015:25
[task 2020-09-07T17:41:48.001Z] 17:41:48 INFO -
[task 2020-09-07T17:41:48.001Z] 17:41:48 INFO - Buffered messages finished
[task 2020-09-07T17:41:48.004Z] 17:41:48 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_devtools_network_targetSwitch.js | Test timed out -
Assignee | ||
Comment 8•4 years ago
|
||
Oops sorry, I missed some files outside of devtools/
Here is a new run, including all mochitests:
https://treeherder.mozilla.org/#/jobs?repo=try&selectedTaskRun=GmvjFk6uQaORuKIH25Pwsw.0&revision=9e7a9ef3ddd0958097c5df52c0b0cb8b2b9a1e99
Also, once again a DAMP run to confirm that this has no impact on performance:
https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&newProject=try&newRevision=72e4dd0f3554e2e65175536a4dd4ce463afb92b9&originalSignature=1910071&newSignature=1910071&framework=12&originalRevision=248bf2bbe964da8b6cb338387519b6cd69ba47c2
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bdaeac93576e
https://hg.mozilla.org/mozilla-central/rev/1859923769f0
https://hg.mozilla.org/mozilla-central/rev/834abe70ee6f
Description
•