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.
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?
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.
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.
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.
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.