polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Mlynarik <tibor.mlyna...@gmail.com>
Subject JSONEntityState internal clone logic
Date Sun, 19 Jul 2015 20:43:07 GMT

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
Also maybe whole cloning could be avoided if cache is not used.

Or am I wrong in understanding of purpose of this state clone ?

View raw message