I'm trying to serialize a record which contains a field Map<DU, DU>. I understand that this is probably a strange edge-case.
I previously implemented the serializer using Thoth.Json.Net (which uses Newtonsoft) and came to the conclusion, that there must be a performance problem with that project, since serializing a 1mb file took 6 seconds, but when using Newtonsoft directly it only took around 500ms (with the default DU serialization).
So I re-implemented the serializer using this project, since you support the 'TothLike' union style. As it turns out, the runtime is almost identical to Thoth.Json.Net when using JsonUnionEncoding.ThothLike vs. the default settings (~6 seconds vs. ~500ms).
10x runtime, how is that possible? Am I doing it wrong?
Edit: Sorry, I really should have tested this better before opening this issue. Serialization is very fast, didn't measure the right thing.
Hello,
I'm trying to serialize a record which contains a field
Map<DU, DU>
. I understand that this is probably a strange edge-case.I previously implemented the serializer using
Thoth.Json.Net
(which uses Newtonsoft) and came to the conclusion, that there must be a performance problem with that project, since serializing a 1mb file took 6 seconds, but when using Newtonsoft directly it only took around 500ms (with the default DU serialization).So I re-implemented the serializer using this project, since you support the 'TothLike' union style. As it turns out, the runtime is almost identical to
Thoth.Json.Net
when usingJsonUnionEncoding.ThothLike
vs. the default settings (~6 seconds vs. ~500ms).10x runtime, how is that possible? Am I doing it wrong?
Edit: Sorry, I really should have tested this better before opening this issue. Serialization is very fast, didn't measure the right thing.