Closed
Bug 1516197
Opened 5 years ago
Closed 5 years ago
Debugger loads slowly
Categories
(DevTools :: Debugger, defect, P2)
DevTools
Debugger
Tracking
(firefox66 fixed)
RESOLVED
FIXED
Firefox 66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: jlast, Assigned: jlast)
Details
Attachments
(2 files)
It looks like we made a change lately that slows the debugger down on initial open. STR: 1. go to a complicated page (e.g localhost:8000 for the launchpad) 2. cmd+option+i w/ debugger as the default slow: https://perfht.ml/2RgxPzx fast: https://perfht.ml/2GzMjq4 When I measured it in perf.html it looked like ThreadActor.onSources was pretty slow... The last change too it removed a Promise.all, which might have made the fetch non-blocking... I'm not too sure Reverting that change seems to speed it up > diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js > index c9c87265863e..105a70bdbe09 100644 > --- a/devtools/server/actors/thread.js > +++ b/devtools/server/actors/thread.js > @@ -1235,10 +1235,10 @@ const ThreadActor = ActorClassWithSpec(threadSpec, { > return res ? res : {}; > }, > > - onSources: function(request) { > - for (const source of this.dbg.findSources()) { > + onSources: async function(request) { > + await Promise.all(this.dbg.findSources().map(source => { > this.sources.createSourceActor(source); > - } > + })); > > // No need to flush the new source packets here, as we are sending the > // list of sources out immediately and we don't need to invoke the > (END)
Assignee | ||
Comment 1•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0b31c70c44074c4e81b513155f615ca17d16aa04
Assignee | ||
Comment 2•5 years ago
|
||
Assignee: nobody → jlaster
Attachment #9033303 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 3•5 years ago
|
||
talos run to measure the performance impact https://treeherder.mozilla.org/perf.html#/comparechooser?newProject=try&newRevision=49130805484f42e121f564780678fc4ae2624bba
Updated•5 years ago
|
Attachment #9033303 -
Flags: review?(bhackett1024) → review+
Pushed by jlaster@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e2ba0eeb80c7 Improve Thread.onSources performance. r=bhackett
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e2ba0eeb80c7
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Assignee | ||
Comment 6•5 years ago
|
||
It looks like I might have jumped the gun here... here is a profile of Firefox Nightly with the change -- https://perfht.ml/2Rgk5oB It looks like `this.emit("newSource", actor)` might be the problem, perhaps this patch https://searchfox.org/mozilla-central/diff/b03057f1e8526bba8979955ddd39aee0e649b463/devtools/server/actors/utils/TabSources.js#142 should not have dropped this condition `if (!actor.source) {`?
Assignee | ||
Comment 7•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7c5b690d794d10b99b11e20c1b539d81e86b5db9
Assignee | ||
Updated•5 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•5 years ago
|
||
The main change from my patch is that `this.emit("newSource", actor);` used to run in the next microtask, whereas now it is running synchronously from `onSources`. That seems like the most likely issue?
Comment 9•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Priority: -- → P2
Comment 10•5 years ago
|
||
Pushed by lsmyth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1deebf9d09a8 Delay newSource packet processing to avoid blocking onSources. r=jlast
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1deebf9d09a8
Status: REOPENED → RESOLVED
Closed: 5 years ago → 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•