Open Bug 1462561 Opened 4 years ago Updated 11 months ago

reduce the cost of protocol.js's read/write methods

Categories

(DevTools :: Framework, defect, P3)

defect

Tracking

(Fission Milestone:Future)

Fission Milestone Future

People

(Reporter: ochameau, Unassigned)

References

(Blocks 4 open bugs)

Details

(Whiteboard: dt-fission-future)

During the various attempts to refactor actors to protocol.js (bug 1289193),
we often got regression reported by DAMP.
It became clear in bug 1449162 that read and write methods, in protocol.js are a source of slowness.
These methods are a key component of it. They are the methods that interpret the specifications and convert packets accordingly. "read" converts packets on the client side, to hand over objects to fronts, while "write" converts actors responses to packets.

These methods have two goals:
* map the input objects or packet to an object or packet:
  * it maps a request arguments to a given packet form
  * it maps an actor response object to a given packet form
* do custom marshalling:
  * when an actor methods returns an actor instance, the actor is automatically managed by the current actor and we return the actor form in the packet.
  * some actor do similar custom convertions like long string actor

In order to do that, these methods ends up:
* calling a log of function
  If the type of a request or response is complex, or if there is many values/attributes, we end up calling one such read/write method per attribute/value.
* duplicate all objects/arrays
  Except primitive types (string, boolean, json, ...), all other types used in specification will force duplicating the objects.

In this bug, I would like to see if we can reduce the number of function call and stop duplicating objects. In order to do that, we may have to get rid of some features/behaviors of protocol.js.
Severity: normal → enhancement
Priority: -- → P2
Blocks: 1449162
Blocks: 1465778
Product: Firefox → DevTools
Whiteboard: dt-fission
Whiteboard: dt-fission → dt-fission, dt-fission-framework
Whiteboard: dt-fission, dt-fission-framework → dt-fission
Priority: P2 → P3
Whiteboard: dt-fission → dt-fission-reserve

Tracking Fission DevTools bugs for Fission Nightly (M6)

Fission Milestone: --- → M6

dt-fission-reserve bugs do not need to block Fission Nightly (M6).

Fission Milestone: M6 → ---

Tracking dt-fission-reserve bugs for Fission MVP until we know whether they really need to block Fission or not.

Fission Milestone: --- → MVP

Moving old "dt-fission-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission-reserve → dt-fission-future
You need to log in before you can comment on or make changes to this bug.