Skip to content

[C#] Enable pooling of messages with large RepeatedFields #7828

@ThorstenReichert

Description

@ThorstenReichert

What language does this apply to?
C# proto3

Describe the problem you are trying to solve.
Sending multiple messages, each containing a large RepeatedField (all of the same size), without allocating a new backing array for each RepeatedField. Effectively, I'd like to be able to pool RepeatedFields for reuse.

Describe the solution you'd like
One possible solution could be to provide a method similar to Clear, which keeps the backing array and only resets the count field (see here).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions