Current time: 07-22-2014, 05:26 PM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] is_moderator is not cached
03-06-2007, 12:07 AM (This post was last modified: 03-10-2007 07:45 PM by Dennis Tsang.)
Post: #1
[F] is_moderator is not cached
It seems that moderator permission of each forum is not cached, therefore if a site has 50 forums and subforums, if a user access to index.php, MyBB will do at least 50 queries to obtain is_moderator of that forum. The problem comming from get_moderator_permissions functions and is_moderator function in functions.php. Should we do some caching here?

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user
03-10-2007, 08:01 PM (This post was last modified: 03-10-2007 08:04 PM by vnc.)
Post: #2
RE: is_moderator is not cached
If a user is not admin and super modder, it will generate alot of queries if there are many sub-forums especially the index.php.

These similar queries just repeat many times:

PHP Code:
SELECT FROM mybb_moderators WHERE uid='123' AND (fid='5' OR fid='7' OR fid='19' ....) 

You can take a look at my site at http://mkportal.thevnchannel.com/support/index.php . I also activate debug info for registered users so you will know what's wrong. Currently it generate more than 70 queries in that index forum even I turned the modlist off.

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user
03-11-2007, 09:07 PM (This post was last modified: 03-11-2007 09:08 PM by Dennis Tsang.)
Post: #3
RE: is_moderator is not cached
Ok let's start this thread all over again (I split the other posts here).

Tikitiki's working on a fix for this.

Dennis Tsang
http://dennistt.net
Find all posts by this user
03-16-2007, 03:44 AM
Post: #4
RE: [F] is_moderator is not cached
This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.
Visit this user's website Find all posts by this user
04-13-2007, 07:41 PM
Post: #5
RE: [F] is_moderator is not cached
May you show me how to fix this one?

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user
05-17-2007, 09:20 PM (This post was last modified: 05-17-2007 09:26 PM by vnc.)
Post: #6
RE: [F] is_moderator is not cached
This issue is not solved in MyBB 1.2.7 yet. It's still using many queries to obtain is_moderator forums and subforums. You can take a look here. I created some forum for testing.

http://vmk.110mb.com/demo/mybb/forum/index.php?debug=1
(The testing forum is on a free server which is not stable, You may have to try some times to reach this page)

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user
05-17-2007, 10:21 PM
Post: #7
RE: [F] is_moderator is not cached
This is only fixed for MyBB 1.4 because it requires a rewrite of the Moderator Cache and that is also why you didn't receive a response for a fix.
Visit this user's website Find all posts by this user
05-18-2007, 12:11 AM
Post: #8
RE: [F] is_moderator is not cached
I asked so because it was listed in Fixed Bug List in MyBB 1.2.7 Released - Security & Maintenance Release.
So if it is not fixed yet. It should be taken out of that list.

Best Regards,

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user
05-18-2007, 12:32 AM
Post: #9
RE: [F] is_moderator is not cached
Gone
Visit this user's website Find all posts by this user
05-18-2007, 01:44 AM
Post: #10
RE: [F] is_moderator is not cached
Good, Tikitiki.

[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication