Could you list total queries it runs on each page euantor? Also is majority of the queries cached?
I can do that, yes. Nothing is cached as caching should only be used for objects that don't frequently change. Obviously, alerts do change fairly often. Templates are, of course, cached though.
Ok, global queries: 1;
SELECT COUNT(id) AS count FROM mybb_alerts WHERE uid = 1 AND unread = 1 AND type IN ('rep','pm','buddylist','quoted','thread_reply')
User CP (Alerts listing): 12 total;
User CP (Alerts settings): 9 total;
Sending PM: 1;
Adding to buddylist: 1;
Adding rep: 1;
Quoting: 2 (though one of them can be sizeable depending on how many people are getting quoted...)
Reply to thread: 1;
I've tried to keep them to an absolute minimum wherever I can. There are likely more optimisations I can make and that's pretty much all I'm working on right now.
Quote:SELECT COUNT(id) AS count FROM mybb_alerts WHERE uid = 1 AND unread = 1 AND type IN ('rep','pm','buddylist','quoted','thread_reply')
IMO you should just add a new user column to save the number of alerts pending reading. That will remove one query for each page being seen.
That seems like such an untidy way of doing things. I already hate how I store alerts settings. If you've taken any classes in database structure you'll know why I'm against it
Oh well, I have not even read a single PHP/DB book, lol
It just seems to me that it is better that reading a full DB table each time a page is loaded.
It may well be "better" in that way, but it means adding a query each time an alert is added and storing a count of values within another table in a column is really not a good idea
Has there been any progress on getting Frost to update his plugin?
He has updated his PluginLibrary and MyAlerts seem to work with it