Revise the implementation of grip's depth
Categories
(DevTools :: Debugger, task)
Tracking
(firefox133 fixed)
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
The depth of grips is current managed via hooks provided by the instantiator of Object Actors:
https://searchfox.org/mozilla-central/rev/6b6c3965d0a79880493b8ae44a92389b72d90636/devtools/server/actors/object/utils.js#575,581-583
https://searchfox.org/mozilla-central/rev/6b6c3965d0a79880493b8ae44a92389b72d90636/devtools/server/actors/thread.js#1782-1784
https://searchfox.org/mozilla-central/rev/6b6c3965d0a79880493b8ae44a92389b72d90636/devtools/server/actors/webconsole.js#428-430
But this is brittle as concurrent call may confuse the shared grip depth counter.
This also introduce complexity as we have to pass down these hooks function in previewers and grip generator functions.
It would be clearer and easier if the depth was handed over from function to function within the previewer codebase.
Thanks can also be simplified around createValueGrip. There is too many such functions.
| Assignee | ||
Comment 1•1 year ago
|
||
This will help get rid of hooks.
| Assignee | ||
Comment 2•1 year ago
|
||
This will later help receive something else than an objectActor as argument.
This will also help pass down the right depth via an options object.
| Assignee | ||
Comment 3•1 year ago
|
||
This clarifies the distinction between the two and help use safeRawObj from previewers.
| Assignee | ||
Comment 4•1 year ago
|
||
This helps use this from previewers.
| Assignee | ||
Comment 5•1 year ago
|
||
Instead, pass a variable down to each function requiring it.
This drastically simplify the story around depth management,
and no longer face race condition if these hooks method were called concurrently.
| Assignee | ||
Comment 6•1 year ago
|
||
For this, we need to be more explicit about the current depth and pass it
from each callsite.
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
The actors were kept, destroyed, in their pool.
It should help free some more cycles and memory.
| Assignee | ||
Comment 8•1 year ago
|
||
Some improvements, 3 to 10% on various types when running console.log-in-loop-content-process-* tests.
But still a 34% regression on node type.
I got a much higher regression due to an issue around depth, I'm wondering if there is still one hidden somewhere.
I'll followup on this.
Comment 10•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9acaa9459ff5
https://hg.mozilla.org/mozilla-central/rev/69bf4e17063f
https://hg.mozilla.org/mozilla-central/rev/f6b44bfde8b8
https://hg.mozilla.org/mozilla-central/rev/cf8af58e5624
https://hg.mozilla.org/mozilla-central/rev/876c923f770e
https://hg.mozilla.org/mozilla-central/rev/6e2c5c0edc4a
https://hg.mozilla.org/mozilla-central/rev/9b1af84f3f93
| Assignee | ||
Comment 11•1 year ago
|
||
Even after rebasing this patch queue on top of bug 1923336, which fixes DOM Element logging performance tracking in DAMP,
I still get a 18% regression on console.log-in-loop-content-process-node.
https://treeherder.mozilla.org/perfherder/comparesubtest?originalProject=try&newProject=try&newRevision=ac3ada97480b4b2fdfa952bf1619c5f1013ac3c9&originalSignature=4763542&newSignature=4763542&framework=12&application=firefox&originalRevision=902a9500a21b3ddd15572e1d7897aa4c1f7293aa&page=1&showOnlyConfident=1
I may have changed the behavior of it, but it is unclear what.
Description
•