Forewarning: a potentially silly question, purely out of curiosity.
If, for example, I perform an AJAX request and get back an array of 1,000 objects like this;
{
MinimumDistance: ...,
MaximumDistance: ...,
MinimumTime: ...,
MaximumTime: ...,
ReallyLongButDescriptivePropertyName: ...
}
Will this consume more memory than if I had shorten the member names (e.g. MinDist)?
If so, is there anything I do to lessen the memory footprint of these objects rather than shortening the member names?
Thanks.
Using longer properties might end up in a longer ( meaning that it occupies more bytes and so more bandwith and more time to reach the client) response. But usually the response is
gzippedand so the overhead is minimal compared to the usefulness of having understandable property names.In any case returning 1.000 object is not a good practice, you should page them and keep your response as small as possible, particularly considering that mobile phones have reduced bandwidth