Open Bug 1651849 Opened 4 years ago Updated 2 years ago

Fission Browser Toolbox severe hangs due to Debugger

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Fission Milestone:Future)

ASSIGNED
Fission Milestone Future

People

(Reporter: Harald, Assigned: ochameau)

References

(Depends on 2 open bugs, Blocks 3 open bugs)

Details

(Whiteboard: dt-fission-future)

I was trying to inspect DevTools UI. Browser toolbox panels loaded very slowly but were OK after the initial delay.

Later, the whole UI froze for seconds: https://share.firefox.dev/3fhvKvR

addSources/< and insertSourceActors/< both lead to getDisplayedSources< where most time is spend. Maybe instrumenting those with markers (bug 1634467) might help to dig into which kind of sources are being added.

Oof, that's rough. I think what I see in that is unfortunately just us having a lot of sources, which likely points at us needing to revisit how we calculate and render the sources tree.

Out of curiosity Harald, do you think the Nightly you were debugging had a lot of tabs open, was this your normal-usage Nightly? I'm wondering if maybe there was a particularly large number of threads, which could have contributed to getDisplayedSources being extra busy.

It's hard to be 100% sure here, but what I don't see is much time in getAllDisplayedSources, so at least our optimizations there seem to have helped a bit?

I think we just need to step back and rethink these selectors, because clearly right now they do too much computation, even if we do our best to memoize it.

Out of curiosity Harald, do you think the Nightly you were debugging had a lot of tabs open, was this your normal-usage Nightly?

This was in my default profile, with 30 tabs or so open (pinned tabs: 3 slack instances, riot, gcal, gmail; heavy hitters with scripts)

Tracking for Fission Nightly milestone M6c. We should fix browser hangs before enabling Fission in Nightly!

Fission Milestone: --- → M6c

Adding dt-fission whiteboard tag to DevTools bugs that mention Fission or block Fission meta bugs but don't already have a dt-fission whiteboard tag.

Whiteboard: dt-fission

Moving dt-fission bugs to Fission MVP.

Fission Milestone: M6c → MVP

Bulk change of all bugs with whiteboard tag of dt-fission to Fission MVP milestone.

Moving old "dt-fission" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission → dt-fission-future

Here is a recent record when opening the debugger against a long lasting firefox instance:
https://share.firefox.dev/3FUmxrN

The debugger takes 15s to settle, on this:

  • We still see getDisplayedSources, but only around 360ms
  • disableEmptyLines 1400ms
  • getRelativeUrl 700ms
  • addToTree 600ms

The main overload comes from the fact that we try to display the sources from all the content processes,
this include all JSMs/XPCOM, but also all web pages sources...

It might be relevant to have the multiprocess feature possibly disabled by default and only display all processes on-demand.

Depends on: 1769795
Depends on: 1770959
Depends on: 1770961
Depends on: 1771088
No longer depends on: 1771088
Assignee: nobody → poirot.alex
Depends on: 1772879
Depends on: 1773258
Depends on: 1774364
Depends on: 1771939
Depends on: 1774601
Depends on: 1775200
Depends on: 1775201
Depends on: 1775203
Depends on: 1775252
Depends on: 1775302

All the time spent in the SourceTree might have been worth, but still far from being enough.

When opening the inspector or the netmonitor while the debugger is opened, I'm observing massive slowdown, making the inspector take more than one minute to open:
https://share.firefox.dev/3bhiXwp

We spent all the time creating sources in the debugger.
No idea what are all these sources and why it takes so long in the debugger to process them.

Status: NEW → ASSIGNED
Depends on: 1777203
Depends on: 1778274
Depends on: 1778275

With bug 1777203, the performance of the debugger in the Browser Toolbox "IRL" are way better:
https://share.firefox.dev/3JFDKqy

Compared to a 1 minute freeze or so, now the debugger opens in 3 to 5 seconds.
It no longer freezes, but you can see that the debugger takes a few seconds before showing any source.
It actually seems to display all sources in one go.
It would be nice if we were showing the main thread sources right away.

A couple of things stands out from this profile:

You need to log in before you can comment on or make changes to this bug.