Do Bytes really matter any more? DDP / Mongo

Hi All,

I’m rather a old school programmer used to doing whatever to save bytes when it comes to heavy multiples.

Fairly recently Mongo announced significant space savings in their newer-est version. I don’t really know if this is at the Document level or with Indexing schemes or such.

Generally: We are working with over 5,000 Symbols to “Re-invent an Invented Language” and things are just really going very well!

Specifically: I am looking at the difference between 10s of thousands of this:

FORMAT#1: { _id: “U00:1ud99o”, op: “A:P10_10_8:11:03” }

versus

FORMAT#2: { _id: “1ul345”, uId: “U00”, op: “A”, cId: “L87_2_1”, pN: 0, cN: 0 }

Same Info!

1 Clearly I need to do a lot of string manipulation to derive the info in Format#1 versus Format
2 From what I will guess webSocket speed for one versus the other would not be distinguishable
3 I am programming for the future, if Mongo is going to compress and handle these things, then there’s no reason for me to diddle with this stuff.
4 Direct db access to the various fields seems too good to be true, but I can adjust…

COMMENTS??

I’m heavily leaning toward the record format#2 at this point.

Direct Question: If every record has the same (long) Key Names, will the new Mongo deal with this in a space saving manner? In other-words is there a real space-saving for using short Keys?

Go with the easiest one to read, write, and re-write. Micro-optimize your app just in time, not just in case.

It seems that in your case it just doesn’t matter.

2 Likes

OK, I think I’ll let Mongo carry a little extra load.

Still would be interested in space needed for Keys… but, I’m pretty happy
with what I can up with.

Just a note: My first commercial applications had to fit on Floppies.
Everything. Thems were the days!

However, the flags still go up for me when we are talking potentially
100,000’s of these things.
But then I think what is being done with images and other "fat’ data, and I
relax. A single streaming
video must transport more bytes and a million of these data records.

Now I need to watch my new Tatort! :slight_smile: