Woot, my internet has finally come back to life! The service outage got me bored enough to probe more into this.
I wouldn't mind splitting fetchdata into separate functions and rewriting the code accordingly in order to kill that huge mess of if statements. The large if block would have to be a factor in the server's problems if fetchData is called so much.
If this doesn't fix the problem, it would definitely would reduce the time calling info from $ClientData
Either that or I call information from $ClientData whereever fetchdata is called.
If I'm going about this wrong, tell me what I would need to do, in exact terms. I have LOTS of time on my hands, and I need the practice anyways.
If I get this fixed, I'll move on to dealing with getAccessoryList.