Closed Bug 1769795 Opened 2 years ago Closed 2 years ago

Avoid updating codemirror empty lines on any debugger state update

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It looks like EmptyLines's disableEmptyLines method:
https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/devtools/client/debugger/src/components/Editor/EmptyLines.js#33-54
is called anytime any state change occurs, or at least very frequently!
Whereas this method involves non-trivial computation in CodeMirror.

We should avoid all these unecessary computation. It takes a significant time when opening the debugger from the MBT with many sources.

We were calling the costly disableEmptyLines very frequently, about once for each new incoming source or so.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/543b96c0acab [devtools] Avoid updating empty lines too frequently in the debugger. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Blocks: 1770961
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: