I’m thinking of saving a large amount of data in an array in a serverside script. I’m wondering how big this array would have to be (how many elements) for it to start affecting the games’ performance.
It depends.
If it’s changing a lot or getting created and unreferenced a lot, it could cause more garbage collection cycles which might slow things down.
If it never changes, it won’t affect much other than maybe running into a memory limit.
Test it and find out
It depends on what you put in it. The limit is huge though, but it might cause lag. However, if your table is THAT huge, you should really try compressing it in some way. You’ll most likely be fine, roblox can handle it. Just test it out and see.
I will be adding onto it whenever a specific event happens and emptying it when there’s 100 elements in the array. Do you think that would cause a noticeable effect?
Not really (unless it takes too much memory). The performance part of it comes with what you do with it. If you constantly edit some of it at once, it won’t be a problem.
The main problem is memory, but I would doubt it would reach that point.
If I’m correct, a letter is 8 bits(or 1 byte), so it would take 10 ^ 9
letters to take up 1 gigabyte.