Closed Bug 1775302 Opened 2 years ago Closed 2 years ago

Avoid unnecessary updates to DebugLine when the source text is loading.

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox104 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We get some intermediate state update when sourceTextContent is loading.
The goal is to reduce the calls to any CodeMirror API.

In mapStateToProps, we set sourceTextContent and location no matter is the state of loading of the text content:
https://searchfox.org/mozilla-central/rev/b1a5802e0f73bfd6d2096e5fefc2b47831a50b2d/devtools/client/debugger/src/components/Editor/DebugLine.js#131-132

But at the end, in the Component, we ignore when the text content isn't fully ready:
https://searchfox.org/mozilla-central/rev/b1a5802e0f73bfd6d2096e5fefc2b47831a50b2d/devtools/client/debugger/src/components/Editor/DebugLine.js#64-67

So that we should be able to pass all props only once everything is ready.
Until then, just pass nothing so that there is no intermediate component updates.

Also stop passing frame to DebugLine which wasn't using this attribute.
This might prevent unnecessary component updates.

We get some intermediate state update when sourceTextContent is loading.
The goal is to reduce the calls to any CodeMirror API.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/097f2369f88e
[devtools] Remove WebReplay leftover "preview paused location". r=bomsy
https://hg.mozilla.org/integration/autoland/rev/1261b8b41f96
[devtools] Avoid unnecessary updates to DebugLine when the source text is loading. r=bomsy
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch

== Change summary for alert #34669 (as of Wed, 29 Jun 2022 09:44:58 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
36% damp custom.jsdebugger.stepOver.DAMP windows10-64-shippable-qr e10s fission stylo webrender 414.32 -> 263.86
35% damp custom.jsdebugger.stepOver.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 411.23 -> 265.81
22% damp custom.jsdebugger.stepOver.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 451.42 -> 353.91
19% damp custom.jsdebugger.stepOver.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 450.30 -> 364.17
10% damp custom.jsdebugger.preview.DAMP windows10-64-shippable-qr e10s fission stylo webrender 500.83 -> 451.49
... ... ... ... ...
3% damp custom.jsdebugger.stepOut.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 482.55 -> 468.70

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

Note that the pushlog contains also Bug 1775252, Bug 1775203 and Bug 1775200

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

Attachment

General

Created:
Updated:
Size: