Closed Bug 1660881 Opened 4 years ago Closed 4 years ago

Use XPCOMUtils.defineLazyModuleGetters() to defer loading of not immediately necessary modules in Marionette

Categories

(Remote Protocol :: Marionette, task, P1)

Default
task

Tracking

(Fission Milestone:M6c, firefox82 fixed)

RESOLVED FIXED
82 Branch
Fission Milestone M6c
Tracking Status
firefox82 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Keywords: memory-footprint, perf, perf-alert, Whiteboard: [marionette-fission-mvp])

Attachments

(5 files)

Right now we make use of ChromeUtils.import() in most of our JS modules, even for those which aren't necessary when loading other Javascript modules. As such we should move all of those imports over to XPCOMUtils.defineLazyModuleGetters() like I started for bug 1660781.

Depends on: 1660781
No longer depends on: 1601618
No longer depends on: 1660781
Blocks: 1660168
Summary: Use XPCOMUtils.defineLazyModuleGetters() to defer loading of not immediately necessary modules → Use XPCOMUtils.defineLazyModuleGetters() to defer loading of not immediately necessary modules in Marionette
Fission Milestone: --- → M6c
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P3 → P1
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/44dd7f2ed88d [marionette] Declare EXPORTED_SYMBOLS at the top of the file. r=marionette-reviewers,maja_zf https://hg.mozilla.org/integration/autoland/rev/d5e8c5535e82 [marionette] Use XPCOMUtils.defineLazyModuleGetters() to defer loading of not immediately necessary modules. r=marionette-reviewers,maja_zf https://hg.mozilla.org/integration/autoland/rev/95a0780452c4 [marionette] Always define lazy getter for Log as "logger". r=marionette-reviewers,maja_zf https://hg.mozilla.org/integration/autoland/rev/40b55420b5a1 [marionette] Use defineLazyServiceGetter to define global services. r=marionette-reviewers,maja_zf https://hg.mozilla.org/integration/autoland/rev/5189d2f8ad9f [marionette] Use defineLazyGetter to define global objects. r=marionette-reviewers,maja_zf

As early numbers from perfherder shows there is a ~8% memory reduction for Base JS After tabs open across all the platforms:

https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=autoland&newRevision=f1af63fb5986e30fa5695a26b9ed7cd506475e1d&framework=4&selectedTimeRange=172800

Lets wait for final results from perf sheriffs.

== Change summary for alert #26899 (as of Thu, 10 Sep 2020 06:19:39 GMT) ==

Improvements:

8% Base Content Resident Unique Memory windows10-64-shippable opt 12,435,771.08 -> 11,402,240.00
8% Base Content JS linux1804-64-shippable opt 3,455,458.67 -> 3,179,690.67
8% Base Content JS linux1804-64-shippable-qr opt 3,455,469.33 -> 3,179,688.67
8% Base Content JS macosx1014-64-shippable opt 3,461,111.33 -> 3,184,984.00
8% Base Content JS windows10-64-shippable opt 3,526,014.67 -> 3,248,868.00
8% Base Content JS windows10-64-shippable-qr opt 3,512,014.67 -> 3,245,393.33
7% Base Content JS windows7-32-shippable opt 2,703,117.33 -> 2,501,289.33
4% JS linux1804-64-shippable opt 98,197,441.26 -> 94,370,478.50
4% JS linux1804-64-shippable-qr opt 97,957,907.42 -> 94,418,509.24
3% JS macosx1014-64-shippable opt 99,617,111.46 -> 96,292,072.01
3% JS linux1804-64-shippable opt tp6 191,217,427.91 -> 184,956,099.10
3% JS windows10-64-shippable-qr opt 100,273,159.07 -> 97,334,896.31
3% JS windows10-64-shippable opt 99,909,958.49 -> 97,265,610.66
3% Base Content Explicit linux1804-64-shippable opt 11,243,362.46 -> 10,950,314.67
2% Base Content Explicit linux1804-64-shippable-qr opt 11,224,405.33 -> 10,958,506.67
2% JS linux1804-64-shippable-qr opt tp6 188,978,287.57 -> 184,638,509.06
2% JS windows7-32-shippable opt 74,960,451.47 -> 73,282,731.03

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=26899

Keywords: perf-alert
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: