polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: Prototype cloning?
Date Fri, 22 May 2015 09:06:07 GMT
Niclas Hedhman a écrit :
> There is this sub-optimal section in the ValueBuilderWithPrototype.java
>
>     // @TODO there is probably a more efficient way to do this
>     ValueSerialization valueSerialization = currentModule.valueSerialization();
>     String serialized = valueSerialization.serialize( prototype );
>     value = valueSerialization.deserialize( valueModel.valueType(), serialized);
>
> And this approach is of course a performance hog, as well as introducing a
> strange problem about initializing ValueComposites with Associations.
>
> And it should be required to clone via serialization, but I understand that
> the effort might be substantial... Any takers??
Couldn't it be replaced by programmatic cloning of underlying
AssociationStateHolder? Not trivial though.


Mime
View raw message