Skip to content

Support or possibility of pooling for ByteArrays? #975

@r-zotter

Description

@r-zotter

I tried to find a way to make ByteArray values poolable with ArrayPool when deserializing proto contracts with protobuf-net,
and the only possible way I found was using an ISerializer implementation combined with an IMemoryConverter.

But using ISerializer for a proto contract comes with the cost, that serializing and deserializing of all proto members needs be done "manually", which is bad for maintainability, extensibility and readability, and would only be a way that works for small contracts with 1 or 2 members.

As I have a proto contract with much more members, where only a few need to be able to get pooled on deserialization, my question is if there is another possible way to do this?

Is there an ISerializer implementation (that is not internal in protobuf-net), where I can derive from and override the deserialization for single proto members? Or is there a way to set a serializer for ProtoMember?

Thanks

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