Immutable deserialization for databoard variants by default /Tu
|Assignee:||Tuukka Lehtonen||% Done:|
|Velocity based estimate||-|
|Release||Simantics 1.6||Release relationship||Auto|
Changed databoard VariantSerializer to be immutable by using Bindings.getBinding instead of Bindings.getMutableBinding.
The previous implementation of VariantSerializer was copied to MutableVariantSerializer as is.
This was done because using mutable bindings for large data, such as large byte arrays would cause the serializer to create
ArrayList<Byte> where each single Byte would take up 17 bytes of actual memory from the JVM thus causing OOM really quickly
even with relatively small arrays. Besides, all other deserializers in DefaultSerializerFactory were immutable but VariantSerializer
was mutable for no apparent reason.