Welcome to Dungeon Fighter Online Forums!
A Dungeon Fighter Online fansite, based around the mechanics of the game.

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

Other site optimizations & suggestions

Discussion in 'Suggestion Box' started by Fiel, May 18, 2010.

  1. Fiel New Member

    Store the CSS as files
    At default, the CSS files are stored in the database. When an HTTP request is made, this results in multiple queries to the database to fetch the files, then further overhead to render any template hooks. This is done for every page that is rendered, slowing down the board significantly. The solution is to cache the CSS as files, and this functionality is built-in to vBulletin. So instead of a query for every CSS file, vBulletin stores the resultant CSS files on the hard drive then only overwrites them when you change the CSS yourself.

    AdminCP --> Settings --> Options --> Style & Language Settings --> Store CSS as files? --> Set to yes

    Make sure to chmod /forum/clientscript/vbulletin_css/ to 0777 so it can be written to. If the directories don't exist, create them.

    Implement the datastore
    This will be a smaller boost, but vBulletin supports storing sparingly changed information (ranks, forum names and descriptions, blog categories, etc.) in memory to prevent another database query. You told me before that you're using APC - vBulletin can integrate with that.

    Go into your /includes/config.php and make the following change:

    Code:
    	// ****** DATASTORE CACHE CONFIGURATION *****
    	// Here you can configure different methods for caching datastore items.
    	// vB_Datastore_Filecache  - to use includes/datastore/datastore_cache.php
    	// vB_Datastore_APC - to use APC
    	// vB_Datastore_XCache - to use XCache
    	// vB_Datastore_Memcached - to use a Memcache server, more configuration below
    $config['Datastore']['class'] = 'vB_Datastore_APC';
    
    To make sure it's working, an "apc.php" file should be included with your APC source code download. Run it to see if the datastore is working properly. You can see the one on Southperry here. If the datastore is working, you'll see variables being stored in "User Cache Information".

    Other plugin authors have attempted to move templates to the datastore (here), though I don't see any more of these hacks for vB4.

    Sign up for Google Analytics
    It has a negligible performance hit and it allows you to track what browsers and features the majority of your users have. It's worth the investment.

    Move avatars to the file system
    Again - fewer queries

    AdminCP --> Avatars --> User Picture Storage Type

    You will likely have to chmod a few directories to do this.
  2. Infection Cool story, bro

    Oh, I'd think the CSS were already stored as files.

    Gogogo, Spaz!
  3. LHCGreg Code monkey like Fritos

    CSS as files: already done
    Datastore: already done
    Google analytics: already planned
    Move avatars to file system: Just did it now

    Thanks.

Share This Page