Closed Bug 1170157 Opened 5 years ago Closed 4 years ago

Consider using protobuf for message serialization

Categories

(Firefox Graveyard :: Shumway, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: till, Unassigned)

References

Details

We currently use hand-crafted (de)serialization code for the message passing between the player and IO parts of Shumway. This is suboptimal for robustness and probably also for performance (i.e., we have lots of unaligned accesses).

Google's protobuf is probably about as good as it gets for object serialization, and there's a fast JS implementation available:
https://github.com/mafintosh/protocol-buffers

One issue: we sometimes do inline (de-)serialization right when data is created or used. Most prominently, shape data is stored in serialized form and directly converted into Path2D objects. I'm not sure if it's possible to inline the (de-)serializers like that.
Product: Firefox → Firefox Graveyard
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.