Dynamically load reducers in the inspector
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: gl, Assigned: rcaliman)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Updated•6 years ago
|
Comment 1•6 years ago
|
||
This bug has not been updated in the last 6 months. Resetting the assignee field.
Please, feel free to pick it up again and add a comment outlining your plans for it if you do still intend to work on it.
This is just trying to clean our backlog of bugs and make bugs available for people.
Assignee | ||
Comment 2•5 years ago
|
||
The Inspector loads all its panels' reducers up front, regardless if they're used or not.
Some of the reducers are quite hefty. It seems needless to load and parse code that's not used.
In addition, the reducers are loaded in a different place than their corresponding actions. Actions are loaded and used in the panels, but the reducers are all loaded in the Inpector.
Perhaps it helps readability if actions and reducers are loaded together where they are used, in the sidebar panels.
This patch uses the approach described in the Redux docs to inject reducers on-demand: https://redux.js.org/recipes/code-splitting/#reducer-injection-approaches
There still are reducers which need to load immediately when the Inspector is initialized. But others, like the reducer for the Animations or Fonts panel, are loaded on-demand when the corresponding panels are visible. For the most part, reducers are used in response to actions from their corresponding panels. However, the grid, flexbox and grid highlighter reducers are also used on-demand in HighlightersOverlay.js
. In these cases, we load the reducers on-demand even if their corresponding panels haven't been opened yet. When the panels do get opened, the reducers are not re-loaded since they're already available.
Reporter | ||
Comment 3•5 years ago
|
||
Comment on attachment 9133617 [details]
Bug 1464876 - Load reducers on-demand in Inspector sidebar panels
Putting a feedback? on myself to look at this later today. I realized I could miss getting ping'd in phabricator if I don't look at all my emails.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
Description
•