I would expect the performance of serializing a null object reference to
be trivially different than serializing a primitive value. In fact it
may be slightly worse due to the overhead of writeObject().
Unless you're doing a hell of a lot of serialization and profiling has
shown that it's causing a performance bottleneck I wouldn't touch what
you have.
L.
Yaakov Chaikin wrote:
Hi all,
I have the following situation. I have a Vo model that is in essence a
domain/business object model. Of course, a particular screen doesn't
need the entire model to be loaded with data. So, what I was thinking
is
1) Make all class variables objects (as opposed to primitives, most
are objects anyway)
2) Make all class variables NULL, unless I need it for a particular screen.
This way, I won't have to carry data around the wire that I don't need.
The question I have is this. What performance hit, if any, do I get by
passing around an object with null pointers in it? How do they get
serialized?
Is this a good idea in general or am I just imagining that passing
around null pointers saves me "THAT MUCH"?
Thanks,
Yaakov.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]