Avoid unnecessary updates to DebugLine when the source text is loading.
Categories
(DevTools :: Debugger, enhancement)
Tracking
(firefox104 fixed)
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.
Assignee | ||
Comment 1•2 years ago
|
||
Also stop passing frame
to DebugLine which wasn't using this attribute.
This might prevent unnecessary component updates.
Assignee | ||
Comment 2•2 years ago
|
||
We get some intermediate state update when sourceTextContent is loading.
The goal is to reduce the calls to any CodeMirror API.
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/097f2369f88e
https://hg.mozilla.org/mozilla-central/rev/1261b8b41f96
Comment 5•2 years ago
|
||
== 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
Description
•