Closed Bug 1783858 Opened 2 months ago Closed 1 month ago

Directly pass text and mode when creating a new CodeMirror document

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

At the moment, we're often creating a new CodeMirror doc, then setting the text, then setting the mode.
This triggers multiple updates in CodeMirror code, and we can probably have it all done in one go.

We used to create the document, then set the text and the mode, which seemed to
trigger unecessary updates in CodeMirror.
Since CodeMirror document can take an initial value and mode, we make this a possibility
in the source editor, and use it from the debugger codebase.

Depends on D154095

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b9afbfab196
[devtools] Directly pass text and mode when creating a new CodeMirror document in the debugger. r=ochameau.

Backed out for causing devtools failures on browser_dbg-features-wasm.js

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: devtools/client/debugger/test/mochitest/browser_dbg-features-wasm.js | Uncaught exception in test - at chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js:253 - TypeError: can't access property "wrapClass", lineInfo is null
Flags: needinfo?(nchevobbe)

So, it looks like we can't use the new behavior for wasm document.
I fixed that and pushed a new patch: https://treeherder.mozilla.org/jobs?repo=try&revision=535503e21c6cd9d712ea948dd653e486e39c866f&selectedTaskRun=HkSYDtvHTfClJ6F6KsKzoA.0

Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/05d75c56be39
[devtools] Directly pass text and mode when creating a new CodeMirror document in the debugger. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

Improvements detected on DAMP

== Change summary for alert #35209 (as of Wed, 24 Aug 2022 19:48:43 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
3% damp custom.jsdebugger.pause.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 238.94 -> 246.12

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
9% damp complicated.jsdebugger.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender 922.49 -> 841.72
8% damp complicated.jsdebugger.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 912.40 -> 842.56
6% damp complicated.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 991.31 -> 927.69
6% damp complicated.jsdebugger.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 996.25 -> 932.31
4% damp complicated.jsdebugger.reload.DAMP windows10-64-shippable-qr e10s fission stylo webrender 1,600.26 -> 1,543.65
... ... ... ... ...
2% damp browser-toolbox.inspector-ready.DAMP windows10-64-shippable-qr e10s fission stylo webrender 448.12 -> 438.89

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=35209

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