Closed
Bug 1434848
Opened 7 years ago
Closed 6 years ago
StatusBar tries to updates on every state update and its render is slow
Categories
(DevTools :: Netmonitor, enhancement, P3)
DevTools
Netmonitor
Tracking
(firefox68 fixed)
RESOLVED
FIXED
Firefox 68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ochameau, Assigned: hemakshis)
References
Details
Attachments
(2 files)
HAR export is currently very slow. Here is a profile of it: https://perfht.ml/2npGY8N It looks like everytime we fetch a lazy attribute (response content, cookies, headers, ...) the state is updated and a lot of react components try to update. Some of which have quite slow render method. StatusBar is a pure function. It would be helpful to be a Component and have a shouldComponentUpdate method.
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → poirot.alex
Comment hidden (mozreview-request) |
Reporter | ||
Comment 2•7 years ago
|
||
Comment on attachment 8947450 [details] Bug 1434848 - Prevent StatusBar updates by making it be a Component. I did not meant to r? yet. This patch doesn't report any win on DAMP, I would like to first see its impact on a DAMP test involving HAR export.
Attachment #8947450 -
Flags: review?(odvarko)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8947450 [details] Bug 1434848 - Prevent StatusBar updates by making it be a Component. https://reviewboard.mozilla.org/r/217150/#review222954 Static analysis found 4 defects in this patch. - 4 defects found by mozlint You can run this analysis locally with: - `./mach lint check path/to/file` (Python/Javascript/wpt) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: devtools/client/netmonitor/src/components/StatusBar.js:48 (Diff revision 1) > +const UPDATED_TIMINGS_PROPS = [ > + "DOMContentLoaded", > + "load", > +]; > + > +class StatusBar extends Component { Error: Block must not be padded by blank lines. [eslint: padded-blocks] ::: devtools/client/netmonitor/src/components/StatusBar.js:60 (Diff revision 1) > + timingMarkers: PropTypes.object.isRequired, > + }; > + } > + > + shouldComponentUpdate(nextProps) { > + return !propertiesEqual(UPDATED_SUMMARY_PROPS, this.props.summary, nextProps.summary) || Error: Line 60 exceeds the maximum line length of 90. [eslint: max-len] ::: devtools/client/netmonitor/src/components/StatusBar.js:61 (Diff revision 1) > + }; > + } > + > + shouldComponentUpdate(nextProps) { > + return !propertiesEqual(UPDATED_SUMMARY_PROPS, this.props.summary, nextProps.summary) || > + !propertiesEqual(UPDATED_TIMINGS_PROPS, this.props.timingMarkers, nextProps.timingMarkers); Error: Line 61 exceeds the maximum line length of 90. [eslint: max-len] ::: devtools/client/netmonitor/src/components/StatusBar.js:86 (Diff revision 1) > - div({ className: "devtools-toolbar devtools-toolbar-bottom" }, > + div({ className: "devtools-toolbar devtools-toolbar-bottom" }, > - button({ > + button({ > - className: "devtools-button requests-list-network-summary-button", > + className: "devtools-button requests-list-network-summary-button", > - title: TOOLTIP_PERF, > + title: TOOLTIP_PERF, > - onClick: openStatistics, > + onClick: () => { > + openStatistics(connector, true); Error: 'connector' is not defined. [eslint: no-undef]
Updated•7 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 4•6 years ago
|
||
Moving to p3 because no activity for at least 24 weeks. See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P1 → P3
Assignee | ||
Comment 5•6 years ago
|
||
Hi @honza,
If this issue is still unsolved, I would like to give this a try! Could it be assigned to me?
Hemakshi
Flags: needinfo?(odvarko)
Comment 6•6 years ago
|
||
@Alex, it looks like you are not working on this. Can I reassign it?
Honza
Flags: needinfo?(odvarko) → needinfo?(poirot.alex)
Reporter | ||
Comment 7•6 years ago
|
||
Sure. I don't know if this bug is (still) relevant. DAMP was reporting mixed results, but perf-html may help confirm if such patch improves the perf or not.
Assignee: poirot.alex → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(poirot.alex)
Comment 8•6 years ago
|
||
(In reply to Hemakshi Sachdev [:hemakshis] from comment #5)
If this issue is still unsolved, I would like to give this a try! Could it be assigned to me?
Done
Honza
Assignee: nobody → sachdev.hemakshi
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•6 years ago
|
||
Converted StatusBar to a Component and added a shouldComponentUpdate
method to prevent unnecessary updates.
Comment 10•6 years ago
|
||
Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c9d39de3650 StatusBar tries to updates on every state update and its render is slow. r=Honza
Comment 11•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in
before you can comment on or make changes to this bug.
Description
•