Support MemoryPack serialization
I want to extend serialization using MemoryPack.
I added Orleans.Serialization.MemoryPack to the Orleans repository, but now my tests are failing.
I noticed the MemoryPack Source Generator isn't running during compilation. Why?
Can you help me? @ReubenBond
The code at https://github.com/jerviscui/orleans/blob/memorypack/test/Orleans.Serialization.UnitTests/MemoryPackSerializerTests.cs
@neuecc Help 🙋♂️
https://github.com/dotnet/orleans/issues/9644
Dude, implement your memory pack serialization wrapper and add it via .AddSerialization 🤨
Dude, implement your memory pack serialization wrapper and add it via .AddSerialization
MemoryPack serialization works in my code, but the Orleans unit test fails.
MemoryPack serialization works in my code, but the Orleans unit test fails.
You don't need to change serialization of the system types of orleans itself, memopack only makes sense for large amounts of user-specific data or streaming data for compatible with nats\etc
Hi @0xF6, Looking solely at serialization performance tests, MemoryPack is the fastest. MessagePackTest.ArraySerializeBenchmark-report-github.md
However, during Orleans request processing, I observed that Orleans.Serializer outperforms MemoryPackCodec. Test code: BenchmarkController.cs Run the API and SiloHost, then request the Controller.
Could you help analyze the cause? Is there an issue with the MemoryPackCodec implementation?
@jerviscui please feel free to profile the benchmarks and determine the cause. It's not something I will likely look into soon. My initial hunch would be that there is an inefficiency in the delegation code, either because buffer copying is required or in looking up which serializer to delegate to. There is likely room for improvement there.
@jerviscui please feel free to profile the benchmarks and determine the cause. It's not something I will likely look into soon. My initial hunch would be that there is an inefficiency in the delegation code, either because buffer copying is required or in looking up which serializer to delegate to. There is likely room for improvement there.
OK, when I have time, I will continue to explore.