cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: [jira] [Commented] (CAY-1622) Generated classes shouldn't produce serialVersionUID compiler warning
Date Tue, 04 Oct 2011 15:49:09 GMT
This is a separate task (not that it is not important), so I'd not mix it with serialVersionUID

I have similar ideas about changing internal structure of CayenneDataObject (using [] instead
of a map). This is a big change (and should give a big performance boost not just during serialization,
but in general), but that is more of a long term future...


On Oct 4, 2011, at 6:39 PM, Durchholz, Joachim wrote:

> If the plan is to get the whole serialization stuff right at this time, maybe it's best
to go the extra mile and avoid serializing the Map keys.
> Prerequisite 1: You need to know the field names, both on the sending and the receiving
> Prerequisite 2: You need a way to iterate over all field values, in the same order as
the field names; or you need a way to access the field values given a field name in String
> If these are given, you can transfer just the values and do not need to transfer the
> Win: Halve the amount of data that needs to be transferred. Give or take a few, depending
on circumstances.
> Maybe win: If you're taking the format of serialized data into your own hands, it could
be made identical for the ROP and non-ROP case. This would make it easy to record serialized
data in one environment and replay it in another, which might help folks who are setting up
diagnostics and unit tests.
> Nonproblem: Now that SerialVersionUID takes care that the field structure and hence the
Map keys are the same on both sides, transferring keys is indeed redundant.
> Disclaimer: I know next to nothing about the internals of Cayenne, so this may be much
work than it's worth.
> So, just my 2 cents worth here.
> Regards,
> Jo

View raw message