Alois-xx / SerializerTests

.NET Serializer testing framework
76 stars 22 forks source link

Feedback regarding the test suite - ideas how to improve it #5

Closed aienabled closed 5 years ago

aienabled commented 6 years ago

Regards!

UPD. I understand that the initial intention was partly to demonstrate how slowly BinaryFormatter performed when objects count exceeded the defined threshold. But this test case will be soon irrelevant (thanks to your report!) except the legacy cases. You can keep the current test case, but I think developers will be more interested in a more general test case to compare serializers.

Another benefit of BenchmarkDotNet will be memory allocation measurements and GC count. I can definitely say that it's possible to write a C# binary serializer which doesn't perform (almost) any allocations during (de)serialization (other than allocation of the instantiated objects themselves during the deserialization) as this is what I've already done. Some allocations are required for any object graph serializer (to track references, to buffer chars, etc) but these allocations might be done in a session object which could be reused for future calls of the (de)serialize method and with enough capacity re-allocations are not required.

Alois-xx commented 6 years ago

Is the current state sufficient for you now? The goal is that you can use the project and try some new serializers with your custom objects out to see if the performance is so good or not. Bringing many more tests for different data types is in my opinion of no use since you will quickly run into graph and information overload. It is better to try your specific objects with the test suite and check for yourself.

Alois-xx commented 5 years ago

I will close this one. Good idea for the requirement table if the serializer can serialize private fields, properties, .. . This will be really useful.