Closed Bug 1754407 Opened 2 years ago Closed 2 years ago

Stop updating `sources` in sources.js reducer when fetching text content of sources

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 4 open bugs)

Details

Attachments

(3 files)

For now, we are mutation the source objects when we lazily fetch their source content.
This messes up with redux createSelector as it force updating the source object for which we fetched the source and also the sources object which list all available sources.
This forces us to add some more memoization in order to speed up selectors.

See https://phabricator.services.mozilla.com/D135620#4430442

In this bug, I mean to still host this data in sources.js reducer, but if relevant, we might move this data to its very own reducer (see bug 1541638).

This replaces a jest test with some real usecases.

Attachment #9263017 - Attachment description: Bug 1754407 - [devtools] Use a distinct reducer object for source text content and make source objects immutables. → Bug 1754407 - [devtools] Use a distinct reducer for source text content and make source objects immutables.
Blocks: 1758454
Blocks: 1758458
Blocks: 1748224
No longer depends on: 1748224
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/050226509387
[devtools] Only support ADD_SOURCES options. r=bomsy
https://hg.mozilla.org/integration/autoland/rev/874b6b4c46b7
[devtools] Cover fetching source text content with a mochitest. r=bomsy
https://hg.mozilla.org/integration/autoland/rev/dc8890682402
[devtools] Use a distinct reducer for source text content and make source objects immutables. r=perftest-reviewers,devtools-reviewers,bomsy,AlexandruIonescu
Regressions: 1759146
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Regressions: 1759224
Blocks: 1759313
Regressions: 1759320
Regressions: 1779173
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: