Closed Bug 1838620 Opened 2 years ago Closed 5 months ago

Simplify properties used by breakpoint React Components

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files)

The properties passed from redux mapStateToProps are updated too frequently.
We could simplify them to reduce the number of times we are trying to re-render these components.

Move these props to each individual breakpoint component which happens to be connected component.
So that's easy for them to query selectors.
While doing this, stop exposing an arrow function as property as it forces to re-render on any state change.

Also, avoid doing computation on top of selector's output within the React component,
this will prevent a few unecessary re-renders thanks to redux.

Attachment #9339290 - Attachment description: Bug 1838620 - [devtools] Simplify breakpoint list react component props. → WIP: Bug 1838620 - [devtools] Simplify breakpoint list react component props.
Attachment #9339290 - Attachment description: WIP: Bug 1838620 - [devtools] Simplify breakpoint list react component props. → WIP: Bug 1838620 - [devtools] Reduce the number of updates for the Breakpoint React component.
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Attachment #9339290 - Attachment description: WIP: Bug 1838620 - [devtools] Reduce the number of updates for the Breakpoint React component. → Bug 1838620 - [devtools] Reduce the number of updates for the Breakpoint React component. r=#devtools-reviewers
  • Avoid useless update to top level App component when changing the selected location.
  • Stop passing delay from WhyPaused parent as it is a connected component and can query the selectors itself.
  • Also avoid various useless updates to SecondaryPanes/index which is also a top level component:
    when changing the selected source and frame for ex.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6df0435bdd1b [devtools] Reduce the number of updates for the Breakpoint React component. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/7e4a15bf9219 [devtools] Avoid some useless React component updates. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: