I know this is a frequent question, but I read a lot about it and still can't decide which is the better choice for my case:
I need to design a data structure which have relatively many primitive fields, say 'Person' which contains a lot of information about the person. The underlying framework is MS Orleans, and there are expected to be hundreds of thousands 'Person' instances in memory at every given time (on each machine). At first I thought struct is the better choice since there will be less GC pressure and memory overhead. But as I began to implement the design it turned out to be a pain - 'Person' has 4 nested structs with ~8 fields each (including arrays), and I spent too long implementing IEquatable for each one, not mention that every minor change in one of the structures requires refactoring IEquatable implementation and the ctors.
But then I thought that since 'Person' objects will not be short-lived objects, they will probably get promoted to generation 1 or 2 so maybe GC pressure is not that big of a deal. As for memory overhead (of classes) - I can live with that...
So, can anyone share their thoughts about this case? MSDN suggest not to use structs for objects larger than 32 bytes, which my object easily exceeds.