I have no idea what exactly you are doing. Is it some kind of script to track users in your channel? Either way it looks like you're storing a lot of data and might need to access it a lot: start with learning a bit about hash tables.