Closed Bug 1814609 Opened 1 year ago Closed 1 year ago

Use mutable map in source-actor reducer

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file, 1 obsolete file)

Each time a new source actor is registered, we clone the whole map of all the actors:
https://searchfox.org/mozilla-central/rev/11cf68787bd00edfa7ac6a0ecd07794698cdebdc/devtools/client/debugger/src/reducers/source-actors.js#23-30
whereas it isn't really necessary and can be a very big performance issue.

Also stop modifying source actor objects by putting breakable lines on it.
Ideally source actors should be immutable object. There is only sourceMapURL left.

And clarified the fact that we are having source actor IDs everywhere and never a Source ID.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afdded1ef7c3
[devtools] Use mutable Maps in source actors reducer. r=devtools-reviewers,bomsy

Backed out changeset afdded1ef7c3 (Bug 1814609) for causing devtools failures on browser_aboutdebugging_serviceworker_console.js.
Backout link
Push with failures <--> dt6
Failure Log

Flags: needinfo?(poirot.alex)

Should be fixed in the new revision. I missed a change in create.js.

Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/27fd249983a9
[devtools] Use mutable Maps in source actors reducer. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
  • Remove the usage of PROMISE action, which isn't used
  • Remove the memoizedAction as the reducer is already memoizing the breakableLines

All of this is only useful if we call setBreakableLines concurrently while
this is already in process of being loading.
This may still be theoriticaly possible between newSources and select actions.
But we should rather better coordinate when we pull breakable lines rather than
introduce such complexity. i.e. reduce the number of callsites requiring to load them.

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Comment on attachment 9316334 [details]
Bug 1814609 - [devtools] Simplify source actor breakable line computation.

Revision D169072 was moved to bug 1814608. Setting attachment 9316334 [details] to obsolete.

Attachment #9316334 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: