this post was submitted on 07 Jul 2025
1422 points (99.0% liked)
Microblog Memes
8968 readers
972 users here now
A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.
Created as an evolution of White People Twitter and other tweet-capture subreddits.
Rules:
- Please put at least one word relevant to the post in the post title.
- Be nice.
- No advertising, brand promotion or guerilla marketing.
- Posters are encouraged to link to the toot or tweet etc in the description of posts.
Related communities:
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Except that they're almost certainly just using
int
, which is almost certainly at least 32 bits.256 is chosen because the people writing the code are programmers. And just like regular people like multiples of 10, programmers like powers of 2. They feel like nice round numbers.
Well, no. They are not certainly using
int
, they might be using a more efficient data type.This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example,
chat_participant_id
is definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference betweenu8
andu16
might matter a lot.But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.
Probably why I said "almost certainly". And I stand by that. We're not talking about
chat_participant_id
, we're talking aboutGROUP_CHAT_LIMIT
, probably a constant somewhere. And we're talking about a value that would require a 9-bit unsigned int to store it, at a minimum (and therefore at least a 16-bit integer in sizes that actually exist for types). Unless it's 8-bit and interprets a 0 as 256, which is highly unorthodox and would require bespoke coding basically all over instead of a basicnum <= GROUP_CHAT_LIMIT
.Orrrr they have a u8 chat_participant_id of some kind and a binary data format for message passing. The GROUP_CHAT_LIMIT const may have a bigger data type, but they may very well be trying to conserve 3 bytes per message. Ids can easily start at 0.
150 gigs of bandwidth saved per day doesn't seem like a whole lot at their scale, but if they archive all the metadata, that's over 50 terabytes a year saved on storage - multiplied by how many copies they have of their data. Still not a lot tbh, but if they also conserve data in every other place they can, they could be saving petabytes per year in storage.
Still weird because then they'd have to reuse ids when people leave, otherwise you could join and leave 255 times to disable a group lol