Closed Bug 1783885 Opened 3 years ago Closed 3 years ago

StyleEditor should lazily get and prettify editor content

Categories

(DevTools :: Style Editor, enhancement)

enhancement

Tracking

(firefox106 ?)

RESOLVED FIXED
Tracking Status
firefox106 --- ?

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

At the moment the style editor eagerly fetches the content of all the sources available, and it will also attempt to prettify them.

The prettify step can be extremely costly, especially when dealing with a lot of stylesheets, eg when using the Browser Toolbox in multiprocess mode.

We should delay the prettify step until the user tries to open the source in the editor.
We could also potentially delay fetching the source, provided this doesn't regress other features.

If this change is not leading to any improvement on existing DAMP tests, we should add a new one.

Would like to give a shot at this, it's also pretty impactful on content toolboxes (eg on gmail)

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Adding a custom test for styleeditor loading many stylesheets.

Adding leave-open: will land the test first, and a few days after will land the fix.

Keywords: leave-open
Blocks: 1788169
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f23316f3486f [devtools] Add DAMP performance test for StyleEditor with many minified files r=perftest-reviewers,nchevobbe,sparky
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/36a665be9f2d [devtools] StyleEditor should lazily prettify editor content r=nchevobbe,ochameau

== Change summary for alert #35264 (as of Sat, 03 Sep 2022 11:23:06 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
14% damp inspector.layout.open linux1804-64-shippable-qr e10s fission stylo webrender-sw 247.14 -> 281.58
13% damp simple.styleeditor.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 150.29 -> 169.40
12% damp inspector.layout.open linux1804-64-shippable-qr e10s fission stylo webrender 255.79 -> 285.55
11% damp custom.styleeditor.close.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 8.63 -> 9.56
10% damp custom.styleeditor.close.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 8.49 -> 9.31
10% damp simple.styleeditor.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 156.77 -> 171.65
7% damp custom.inspector.collapseall.manychildren macosx1015-64-shippable-qr e10s fission stylo webrender-sw 0.65 -> 0.69
5% damp custom.inspector.collapseall.manychildren macosx1015-64-shippable-qr e10s fission stylo webrender 0.66 -> 0.69

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
90% damp custom.styleeditor.open.DAMP macosx1015-64-shippable-qr e10s fission stylo webrender 7,472.98 -> 721.41
90% damp custom.styleeditor.open.DAMP macosx1015-64-shippable-qr e10s fission stylo webrender-sw 7,448.86 -> 723.53
89% damp custom.styleeditor.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender 7,211.08 -> 774.60
89% damp custom.styleeditor.open.DAMP windows10-64-shippable-qr e10s fission stylo webrender-sw 7,174.49 -> 778.37
88% damp custom.styleeditor.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 6,787.65 -> 800.04
... ... ... ... ...
7% damp complicated.styleeditor.open.DAMP linux1804-64-shippable-qr e10s fission stylo webrender-sw 417.89 -> 387.24

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

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: