Use mutable map in source-actor reducer
Categories
(DevTools :: Debugger, task)
Tracking
(firefox111 fixed)
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.
Assignee | ||
Comment 1•1 year ago
|
||
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.
Updated•1 year ago
|
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
Comment 3•1 year ago
|
||
Backed out changeset afdded1ef7c3 (Bug 1814609) for causing devtools failures on browser_aboutdebugging_serviceworker_console.js.
Backout link
Push with failures <--> dt6
Failure Log
Assignee | ||
Comment 4•1 year ago
|
||
Should be fixed in the new revision. I missed a change in create.js.
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
Comment 6•1 year ago
|
||
bugherder |
Assignee | ||
Comment 7•1 year ago
|
||
- 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.
Comment 8•1 year ago
|
||
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 9•1 year ago
|
||
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.
Description
•