Will putting an excessive amount of empty strings in a table cause lag

As the title says, I’m wondering if putting an excessive amount (possibly in the thousands) of empty strings in a table used to save data cause lag or bad performance?

Example,

local data_table = {
  "needed_value",
  "needed_value2",
  "", -- insert hundreds of blank values
}

Data Stores can only handle up to about 4 megabytes of Data, which is roughly 4 million characters

It shouldn’t cause lag depending on what you’re doing with it, looping through the Array may take a really long time for the Server to process due to the large amount of keys within the Array, but i dont believe it will cause lag that way, the Server is generally fast with these kinds of things.

If it’s looped through on the client would it cause client-lag or no?

I dont think so, Like i said It depends on what you are trying to do with it. However i could be wrong on the information so not sure.

Just note that its very efficient and you shouldnt experience lag of any sorts depending on how much is there.

It won’t necessarily cause lag, but it might take more time to load some data with more characters rather than loading one key.

1 Like