Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Pre-allocate buffer for serialization #107

@abhinav

Description

@abhinav

It's easy to calculate the final size of the serialized object in advance. We should do that when serializing and allocate the write buffer with that size in advance so that we don't end up resizing it later.

The Protocol could expose a function that allows you to calculate the serialized size of an object, or if that specific protocol doesn't have guarantees around that, -1.

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