Closed inethui closed 1 year ago
Compilation and registering types to the model are different things. Both are thread safe but registering same types in a different order may break compatibility with previously written data. Therefore it's recommended to register everything at the start but it's not necessary to compile it. If AutoCompile
is true
, the compilation only happens on demand.
Thanks, this really helps!
We have a very large amount of classes (more than 10000), and they are configured through RuntimeTypeModel APIs. As compile such a big model takes a very long time, we are leveraging the on-demand compilation mechanism which happens when the type is entered during serialization/deserialization. However, out application runs in a multi-thread context, and we do see strange behaviors, for example, serialization is fine and deserialization failed with error "Wrong format version". Could this be caused by multi-thread issues?