Don't load the whole Reps bundle
Categories
(DevTools :: Inspector, task, P3)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(2 files)
The inspector is using Reps in a few place, and using the Reps bundle to do so.
This is a bit wasteful because the inspector may only need the element node and the text node rep, while the bundle contains all the Reps file + the whole object inspector code.
We should be able to have Reps as individual files in tree that we can require to save up on performance.
Assignee | ||
Comment 1•4 years ago
|
||
Promising patch: https://perfht.ml/2rqR91C
The steps are:
- on a page with a flex container
- open the inspector with Ctrl + Alt + I in order to select the body
- select the layout tab
- in the markup, select the flexbox container
It looks like the new patch makes it almost 2 times faster (rendering FlexBox component from 191ms to 20ms 😎).
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
This allows consumers to directly require a single Rep file
if needed (e.g. the inspector only needs elementNode or textNode).
In order to make this work, the requires for react-dom-factories
and prop-types needed to be changed to the in-tree modules.
We also needed to modified the reps jest config, as well as the
babel config so we can run tests and still generate the reps bundle.
Finally, the dom-node-constants is modified to not use define as
it's not used as an AMD module.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b672a774246 Expose all Reps file. r=jlast. https://hg.mozilla.org/integration/autoland/rev/50db4f5620dc Load individual Rep file in inspector.r=gl.
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4b672a774246
https://hg.mozilla.org/mozilla-central/rev/50db4f5620dc
Description
•