Closed Bug 1591046 Opened 5 years ago Closed 4 years ago

10s+ delay from hitting breakpoint to source showing

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Harald, Unassigned)

References

(Blocks 1 open bug)

Details

What were you doing?

  1. Open Debugger on https://debugger-pretty-print-events-1532240.glitch.me/
  2. Enable mousemove in Event Listener Breakpoints
  3. Close Debugger
  4. Open Debugger and move mouse over page

What happened?

https://perfht.ml/362xmWg

  1. Paused overlay shows instantly, Call stack shows a function reference
  2. No file is shown
  3. Debugger seems idle for 10s
  4. 10s later the file shows, triggering 3 expensive reflows: https://perfht.ml/2BIsTKc
  5. After that, several expensive double-reflows from bug 1591000: https://perfht.ml/2JiMJjo

What should have happened?

At least: Show that file is loading earlier.
Even better: Don't make users wait 10sec

Anything else we should know?

parser-worker.js takes

Sending data then causes 1.5sec of structured clone reading. https://perfht.ml/33SM6oG

Is there anything obviously wrong with how the UI waits for parsing?

Flags: needinfo?(dwalsh)

No, I think it's possibly just a general "large file" problem:

https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/actions/sources/select.js#147-162

We add the tab based on source, which we remap once we mapLocation, which relies on sourcemaps.

We should create a "large files" meta where we track these and put them into a dbg-7* sprint.

Flags: needinfo?(dwalsh)

David, what about:

At least: Show that file is loading earlier.

At least having UI state would help a lot.

We add the tab based on source, which we remap once we mapLocation, which relies on sourcemaps.

How does sourcemaps affect this STR?

Some things I've found interesting in https://perfht.ml/362xmWg at first glance:

  • 421ms spent in a getter at get resource://devtools/client/debugger/dist/parser-worker.js:653
  • 291ms spent in another getter at get typeresource://devtools/client/debugger/dist/parser-worker.js:17247:10`
  • 213ms spent in another getter at get node resource://devtools/client/debugger/dist/parser-worker.js:17211:10

The first one is probably added by Babel/Webpack, while the last ones come from simple-path.js.

At least: Show that file is loading earlier.

https://phabricator.services.mozilla.com/D50255 should help with that.

Blocks: dbg-72

We can't reproduce this anymore.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.