Closed Bug 1690789 Opened 3 years ago Closed 3 years ago

Stop creating a new BreakpointList actor everytime we add/remove a breakpoint

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file, 1 obsolete file)

We are not caching the breakpoint list actor on the server side:

  getBreakpointListActor() {
    return new BreakpointListActor(this);
  },

https://searchfox.org/mozilla-central/rev/927e525f481a93a8f63d27a78ae6201e42b1b1fb/devtools/server/actors/watcher.js#462-464

And we are not caching the corresponding front on the client side:
https://searchfox.org/mozilla-central/rev/927e525f481a93a8f63d27a78ae6201e42b1b1fb/devtools/client/debugger/src/client/firefox/commands.js#252,274

  const breakpointsFront = await targetList.watcherFront.getBreakpointListActor();
  await breakpointsFront.setBreakpoint(location, serverOptions);

So everytime we set/remove a breakpoint, we create a new actor.

Spotted this while implementing a similar pattern for the a ConfigurationActor in Bug 1690698

See Also: → 1690698
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Depends on D104073

Similar issue as for the breakpoint list actor, the networkParent actor can be created from the netmonitor, webconsole, and responsive UI

Severity: -- → S3
Priority: -- → P3
Attachment #9201191 - Attachment is obsolete: true
Attachment #9201188 - Attachment description: Bug 1690789 - [devtools] Create a single breakpoint-list actor per watcher actor → Bug 1690789 - [devtools] Memoize breakpoint-list & networkParent getters in WatcherActor
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d1239fdf8725
[devtools] Memoize breakpoint-list & networkParent getters in WatcherActor r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: