Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla 1 speed - are whispers degrading your forum's perfomance?
fmimoso
✭
I have implemented a simple "solution" (more of a workaround), but I won't bother posting it if anyone doesn't need it - it's somehow intricate and does take a while to write it down.
0
Comments
Step 1 - create a subdirectory named whispers (or whatever you want) under /vanilla directory
Step 2 - copy all existent Vanilla files to that subdirectory (except attachments if that's the case)
Step 3 - edit /vanilla/whispers/conf/settings.php and change all directory calls to point to /whispers instead of /vanilla (except attachments that should point to it's original directory)
Step 4 - Create a link somewhere in vanilla's original installation to /whispers and call it "turn whispers on" (I use page manager and nuggets for this - but edit the files don't do it in the settings page)
Step 5 - Create a link somewhere in vanilla's whispers installation to /vanilla and call it "turn whispers off"
Step 6 - edit /vanilla/conf/settings.php and turn whispers off ($Configuration['ENABLE_WHISPERS'] = '0';)
What's this? It's simple: you have two installs of Vanilla, one with whispers on and one with whispers off. Both installations will use the same database so, no data is lost or duplicated. You expect that users will check their whispers every now and then, but not always, thus not overloading your database with excessive queries everytime a discussion/whisper related page is rendered. Everytime a user feels that the forum is slow, once informed by you, he will turn off whispers and use the whispers off version. Multiply this by some hundred of users and you have a auto load balancing feature...
A couple of warnings:
- if you use page manager, you have to clear it's cache and change some of the tab's links if necessary
- create a robots.txt in /whispers to prevent spiders from indexing it
- a user that has whispers "turned off" won't see any notification of a new whisper (that's the major drawback of this "solution")
- everytime you turn your whispers on, discussions that have whispers will become unread, even if you already read them, I recommend having a link somewhere that searchs for whispers (http://yourvanilla.com/whispers/search/?PostBackAction=Search&Keywords=whisper;&Type=Comments)
It's not perfect, far from it but, it's something that works until I can manage to upgrade to V2.
I sent a mail to support@vanilla asking a quote for a (paid) custom addon that would solve this speed problem but got no answer (shame on you!), so, I had to invent something that would prevent my install from becoming unusable...
Well, since I posted this, I've disabled whispers and implemented an improved User Messages extension "made" by one of my forum members.
That did solve some perfomance issues but, with half a million posts, things were getting slow again...
Checked what queries were slowing things down and solved it by replacing /library/vanilla/Vanilla.Class.CommentManager.php with this: http://pastebin.com/Ku8yTs4w
So, my sugestion:
-> disable and delete all whispers in the database
-> replace file above
It isn't beautiful - I'm no coder or somehow instructed, it's a DIY solution - but it works.
It's fast again.