Closed Bug 1547115 Opened 5 years ago Closed 5 years ago

Logpoints on Gmail in large prettified file completely freezes main thread

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: Harald, Assigned: loganfsmyth)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

What were you doing?

  1. Open Gmail and log in
  2. In DevTools Inspector, pick the body elements events bubble and find the click event (points to https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.en.…/m=b in my case)
  3. Click through to the file to open it in Debugger
  4. Should land on b.addEventListener(c.toString(), e, f);
  5. Add a logpoint on that line, logging c, e, f
  6. Refresh page

What happened?

Logs are coming in until Firefox's main UI freezes. Closing Debugger works and "thaws" Firefox.

What should have happened?

No freezing, just happy logging.

Anything else we should know?

https://profiler.firefox.com/public/e8ddd2b865dbcc465f3a616312780c2cce2049bf/flame-graph/?globalTrackOrder=0&localTrackOrderByPid=66792-0~&thread=0&v=3

addSources and insertSourceActors change redux state and cause codemirror to do expensive renderings on the large prettified file by calling disableEmptyLines in resource://devtools/client/debugger/src/components/Editor/EmptyLines.js. This seems to happen continuesly, even though nothing in the debugger changes.

I think I introduced this in https://phabricator.services.mozilla.com/D24443 by making the empty line selector non-memoized. I'll verify.

Assignee: nobody → lsmyth
Status: NEW → ASSIGNED
Pushed by lsmyth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5293fd5ae92f
Memoize breakableLines to avoid resetting in editor often. r=jlast
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: