New Span-based serialization logic (followup for #7351)#7576
New Span-based serialization logic (followup for #7351)#7576jtattermusch merged 58 commits intoprotocolbuffers:masterfrom
Conversation
|
Is |
I still need to expose the API and add tests, but vast majority of the internal implementation is already there. |
feb0f30 to
90d4969
Compare
|
@gerben-s Can you review please? |
|
The new benchmarks (as of commit 4f0afc7) are here: https://gist.github.com/jtattermusch/c9e5389a398f7c79710a9bf12aee215f |
gerben-s
left a comment
There was a problem hiding this comment.
Yes this looks good to me
|
Is there a timeline, for when the nuget package for C# will be released? Eagerly waiting to be able to use Span with the serialization/deserialization methods you have developed :) |
If everything goes as planned, it should be available over the course of the next few weeks. |
…ffer_serialization New Span-based serialization logic (followup for protocolbuffers#7351)
Span-based parsing has been added by #7351 , this PR adds the serialization counterpart, which allows serialization to
IBufferWriter(which is much more GC friendly).Based on #7490
Update 2020-06-29:
The new benchmarks (as of commit 4f0afc7) are here: https://gist.github.com/jtattermusch/c9e5389a398f7c79710a9bf12aee215f
For both writing primitives and writing messages the performance is comparable (there are some significant improvement and some slight regressions) to the original state, which seems good enough (as this PR offers an API to serialize directly into a Span and/or to IBufferWriter, which are modern APIs allowing for much better GC efficiency).