They say that premature optimization is the root of all evil, but here it goes ...
We have a high-performance application; in-memory cache supported by Java on the server side and what should be a very fast client-side C # GUI.
I note that currently the objects that we use in the cache have default values - for example. initializing the default strings "and" Dates "to 1/1/1999, and not leaving them zero.
Now I can be very thin here, but does this add a little more space to one object (both in the cache and when the object becomes serialized) than otherwise if it were null?
It’s just interesting what kind of improvement (if any) would have happened when our volumes of objects began to become quite high ...
Cheers, Dave.
source
share