I've been asked to review a wordpress plugin of sorts and try to find ways of making it faster. The premise of this plugin is basically to store a bunch of users and shifts and appointments and whatnot. It involves a five major variables, Start of week, day of week, user, resource, and appointment.
Currently, it's using a horrendous method of storing the information by creating a string that basically does:
"var1::var2::var3::var4::var5;;var1::var2...."
Everytime someone needs to look at the calendar, it goes into that string and explodes it, and traverses through the entire thing.
What would be the best way to organize the data so that I can just say, start of week is this, day of week is this, give me an array with the rest of the variables in their respective/related positions?