In MemoryStore docs it states that you get 1kb of memory per user… Is this counting for the key + value or just the value itself?
if so isnt this super small amount and you can barely store any data?
64KB + 1KB ⨉ [number of users]
Because if I for example had a key of
000000000_123456789012345
→ ~ 25 bytes
with a value of
0,123456789102345,99999999
→ ~ 25 bytes
Total of 50 bytes.
This would mean per player, they can only have 20 entries (max)
Context: this is for a auction house
The value. And iirc keys have a limit of 128 bytes.
1 Like
They do indeed have that LIMIT but nothing in the docs say if keys contribute to the total memory limit of the entire experience.
I haven’t seen any official docs on this either, but based on the discussions on the dev forum, I understood that keys don’t count.
WARNING: In a Sorted Map, values are limited to 1KB - they are not of unlimited size! (Is this a bug? Is it meant to be unlimited?)
When it comes to limits, the documentation is wrong (and missing) in many other places too. Testing in Studio, I have discovered these limits and behaviours:
SortedMap memory cost:
Keys are free
Values are not arbitrary but must be convertible to JSON (and therefore arbitrary strings suffer from the same inefficiency as data stores for numerous characters – for …
@chess123mate contributed to the discussion a lot on their own.
Sorry for the wait, couldn’t find the source right away.
1 Like
This is a amazing find, assuming what he said is true keys are free and don’t take up any space for the total memory quota.
Got to ask though, do you know of any ways to store/compress/compact or any method of storing more data in a value with using less kb?
I am trying to make a auction house and have looked into as many possible ways to store more data into the value.
All the data I want to store are numbers.
So is there anyway I could get more data stored into a value with less bytes by using a number? or some way?
1 Like
In all honesty, I haven’t worked with such strict compression in data and memory stores before. Somebody else can maybe give some better advice.
Saving byte strings would do a great deal, but these storages don’t work well with anything that cannot be converted to JSON.
So if I got it right we’re limited to utf8 encoding. I guess you could try to serialize the data in your own way, like how phone providers store messages or browsing history (minimal data, small time stamps…). Sounds like you already did a lot by saving numbers.
1 Like
system
(system)
Closed
July 25, 2023, 2:51pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.