:SetSetting() and :GetSetting() Limits

Hey developers! I’m making a plugin, and I have quite a bit of data to save. And so, I’m just wondering if theres any limits, with how many keys, how many times they can be called, how much data I save, What I can save, etc. to Plugin:SetSetting() or Plugin:GetSetting(), as the documentation has provided me very little information on this.

Any help is much appreciated !

1 Like

All plugin data is saved locally so the only limit is the user’s drive

1 Like

Is there anything that I should be aware about. Is there a ‘recommend amount’ to follow? Is there a limit to how many times I can use :SetSetting() or :GetSetting()

If I have 100 :SetSettings() with 100 unique keys, with data containing strings of 100 characters each, will it take a lot from the users drive? Or is it a small significance?

Thanks for your help so far !

1000 characters is 1000 bytes assuming there are no emojis. 1000 bytes is 1KB

Wouldn’t it be 10,000 bytes, or 10KB (100 Settings with 100 characters or 100 * 100)? And is 1KB-10KB significant?

Thanks for your help so far, I just have a hard time understanding as numbers are being thrown and I’m not sure how significant they are or aren’t.

The maximum amount of data that can be stored in a Roblox datastore is 4mb, which is 400 times 10kb

It’s not that much

Pictures can easily reach 100kb, or a couple mb if it’s quite a big picture

What kind of data are you trying to save that requires you to save 100 different data entries? I don’t think it’s possible to find out what the technical limit to that is, but knowing what you’re trying to accomplish could help you collect some feedback for optimization.

1 Like

This is not about Datastores, this is for Plugin Settings, which have different limits.

EDIT: Check Chilly28’s response

Speaking of which, there appears to be no official mention of a limit, but it’s important to note that you can’t save certain characters, and it might not throw an error or warning to tell you that:

Mainly I was using the 100 as an example, however I will explain. Basically in my plugin I am adding object presents. Basically you select a classname object, and properties set in the plugin, when that object is added to the game model, it will change those objects properties to their presets.

There is other things that I have too that rely on data, such as settings, and future features I may add, that if I could do 100 keys, that I figured I could do with less.

1 Like

That doesn’t sound like it’ll take up 10KB for most people, I think most people would only want a few presets. Realistically, the number of classes someone actually creates manually when creating a game is going to be a relatively small amount compared to the total amount of classes the engine has. Things get trickier with the number of properties and how much data you need to represent them, but you could resort to compression methods if it ever comes to that.

1 Like

If you’re worried about exceeding some sort of storage limit maybe try restricting the presets to specific games? I imagine it would be a lot easier to save presets to a ModuleScript as opposed to storing a large chunk of data in the actual plugin data model.

I was using the datastore limit to give an idea of the amount of data he is saving

It would make sense if there were no limit, things are stored on the local computer. Well, up a point maybe, don’t want to fill up the disk…

1 Like