polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: JSONEntityState internal clone logic
Date Thu, 23 Jul 2015 11:49:15 GMT
Hi Tibor,

Tibor Mlynarik a écrit :
> Hi,
> I have noticed code in JSONEntityState that seems suspicious for me.
> In method JSONEntityState#cloneStateIfGlobalStateLoaded
> if parts are swapped.
> I suppose that by global state is meant copy taken from cache that is shared across UoWs.
> And before first entity change own copy for UoW should be cloned.
> But as it is now, cloning is not done at first change and redundantly executed with each
entity change.
> Also maybe whole cloning could be avoided if cache is not used.
> Or am I wrong in understanding of purpose of this state clone ?
IIRC this is the sole purpose of this state clone.
As you pointed out there may be room for improvements here.

Niclas, WDYT?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message