What do you want to achieve?
I’m wondering what roblox does to optimize data stored in data store or if the data is just kept as strings/bytes as they are.
What is the issue?
I’m currently writing a lot of code to optimize my data and make it smaller but I’m thinking it may be a useless optimization if roblox already does it anyway.
What solutions have you tried so far?
I looked on google and on this website but couldn’t find anything.
Simply don’t go through all the trouble to optimize your DataStores. It’s unnecessary, and a waste of time. To bypass it, just create multiple keys, it’s way easier and more efficient.
Anyway, to answer your question, I don’t believe anyone really knows how data is stored, besides the fact it’s all strings/bytes. The easiest way to do this was to cut down the strings, and when loading the data, use the keywords to generate the full item(s) name.
So you’re saying cutting down the length of the strings we want to store will always save memory? Or does roblox do some sort of optimization to the data we store already?
For example, if I store an integer is it stored as byte codes for the characters like “1” and “2” or is it stored as an actual integer?
dude it’s an extremely funny post. Your not optimizing anything like that and your just making game development harder. Just store it in 1 key, you have this 4 MB limit. If your data reaches over that, you need to rethink how you store your data.
To add to this, you can store thousands of data in a single key due to to the data ur storing being a few bytes. If u hit this limit then rethink how u save data.
Let’s add it more,
if you have like some building system and some players might reach millions of blocks, you can put a simple text compressor, no need for the extra hassle.
So I am doing exactly that. Rethinking how to store my data. That’s why I asked the question. Do you know the answer?
Cant u just store the properties in a table? Really no need for a text compression because u have 4mb per key. Your never really going to hit that limit.
You kinda misunderstood, I said what if you had a player building millions of blocks. That hits the limit. So compressors come in
I know how to compress my data. I’m asking if I should even do it or if roblox is already doing any of these types of optimizations
I doubt. Unless I missed something, but I don’t think they do. I think they wouldn’t optimize because it’s the devs job to do so.