Closed Bug 1853124 Opened 1 year ago Closed 1 year ago

Avoid uncessary CodeMirror updates

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Bug 1775200 started avoiding a few CodeMirror updates, but we still have a few superfluous ones.

Some of these unecessary updates relate to bug 1853123.
But there is also some uncessary changes related to selectedSourceTextContent attribute which changes between undefined, promise with null value and promise with an actual value.

We were trying to update CodeMirror text and scroll position too frequently.
These calls can be expensive on large documents.

Blocks: 1843454
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

For some reason, the previous changeset triggers an additional call to scrollToColumn
during open-large-minified-file DAMP test, only on try but not locally.

Calling codeMirror.charCoords can be slow on large files and we often
try to scroll to the first line/first column. Let's arbitrarily scroll
to top/left when this simple case happens.

Attachment #9353645 - Attachment description: Bug 1853124 - [devtools] Avoid compution cursor location when scrolling to first character. → Bug 1853124 - [devtools] Avoid changing cursor location when scrolling to first character.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14272e0686b3 [devtools] Avoid uncessary CodeMirror updates. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/0fad6751508b [devtools] Avoid changing cursor location when scrolling to first character. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: