Skip to content

Display list serialization / safety. #1800

Closed
@glennw

Description

@glennw

We are experiencing some performance issues with the current display list serialization and deserialization implementation.

We believe that the majority of this is related to codegen issues between serde and rustc. It's possible these will be resolved in the future, but it would be good to have written down what the benefits of the current implementation are. That way, if we consider any changes to the current method, we can ensure we don't miss any of the required functionality.

As an extreme example, consider if we had something similar to the old method - the display list is a set of flat arrays of data, which is simply copied / shared to WR.

The benefits I'm aware of with the current implementation:

  1. bincode gives us compression, reducing the amount of memory that needs to be shared or copied.
  2. We get some level of safety in terms of not needing to validate the display list contents.

The value of (1) seems clear (although we may want to quantify that somehow if we haven't already?). It's less clear to me how (2) works - could we write up an example or two of how this provides safety?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions