Hello!
So I have been working on a logging system where it logs chat messages, commands ran and other things.
I realized that I shouldn’t store the chatlogs indefinitely, so I figured I should take care of clearing up the oldest chatlogs from the array. The array looks something like this:
local chat_logs = {
[1] = {} -- First message
[2] = {} -- Second message
[n] = {} -- nth message
}
Essentially, I have to remove the start of the array. However, I cannot simply equal the value to nil, I have to completely remove it from the array using table.remove
So here’s my question: is there going to be any performance issues with using table.remove since it reindexes every item after the 1st one? How fast is it? Should I worry about it if my array has 5000 items in it?
Thanks!