Jump to content


* * * * -
Photo

Improving Board Efficiency


There are several built-in tools with IP.Board that allow you to improve page load time and efficiency.

Using a CDN

Some power-users find that using a CDN, or Content Delivery Network, makes their website more efficient by storing attachments and media files on a separate server. IP.Board contains built in settings for configuring this, which can be found via your ACP's "General Settings".

Hosting attachments on a different server
For example, if you wish to host attachments offsite, you will need to configure the Upload form action domain setting to point to the correct script for handling uploads on your remote server. You will also need to change your Uploads URL to reflect this location of files.

Hosting Javascript, CSS, and Images on a different server
This can be configured via the Images, CSS and JS URL setting found under the General Configuration in your ACP. This setting is the easiest way to offset some server load and bandwidth use by hosting your javascript files, skin images, and CSS stylesheets on a separate content severing webserver. First, you will need to upload the contents of such items onto the separate server and domain name, so that there is a mirror copy. Remember to update this server whenever you want to change your board's logo or skin content.
The following folders need to be replicated on your CDN server for this setting:
  • public/js
  • public/style_css
  • public/style_images
  • public/style_extra
Cached Content
IP.Board contains a built in cache engine to cache and output content more effectively. This can be toggled via the Content Caching settings in the CPU Saving & Optimization area of the System Settings in your ACP. Unless you have a reason to otherwise disable caching, we strongly suggest leaving caching enabled for your board.



IP.Board by default stores cached data in the database, however support is also included for APC, eAccelerator, Memcache, XCache or storing cached data in files.
Larger sites may benefit from using one of these external cache sources.

To enable any of these, you must first ensure that the appropriate extension is available with your hosting provider. If you enable any of these and they are not available, IP.Board will fallback to the default cache store.
If using the disk cache system, no additional extensions are required. Files will be written to the cache directory, which should already be writable.

Once you have installed any necessary extensions, you simply need to add a line to your conf_global.php file to enable them.

For APC:
$INFO['use_apc'] = '1';

For eAccelerator:
$INFO['use_eaccelerator'] = '1';

For Memcache:
 

$INFO['use_memcache'] = '1';

$INFO['memcache_server_1'] = '';

$INFO['memcache_port_1'] = '';

You will need to fill in the Memcache server address and port in addition to the use_memcache line.
You can also add memcache_server_2 / memcache_port_2 and memcache_server_3 / memcache_port_3 etc. (up to 5) if necessary.

For XCache:
 
$INFO['use_xcache'] = '1';

For disk storage:
$INFO['use_diskcache'] = '1';

Once this is done IP.Board will start using the alternative cache method.

Enabling any of these methods will override the default cache store. You should never add more than one of the above lines of code to your conf_global file.



Minify
IP.Board has a feature called "minify" which automatically compresses javascript and CSS output before sending it to your board. This feature greatly reduces the size of the javascript and CSS that your board calls on pageload and reduces the loading time for your visitors. Although Minify works on almost all servers, there are some instances where it may not be compatible with your webserver, resulting in no CSS or Javascript being displayed. In this instance, simply disable Minify via your ACP to restore things to their proper look and feel. If you are unable to access the ACP, open a support ticket and we can fix this for you.

Remove un-needed hooks
While hooks are great for adding functionality to your board, having too many of them can impact overall performance. Sometimes, a poorly optimized hook can make dozens of database query on each pageload - resulting in hundreds of thousands of database lookups from all the users on your site. If you notice a performance impact, try disabling 3rd party hooks to see if performance becomes stable again. Then, re-enable the hooks one by one to see if any one particular hook is a problem.


Saving SQL Resources
If you are having problems with load on your SQL server, configuring some of the settings here may help the problem.
Each one of these settings will remove queries from particular areas of your community. You can also choose to kill searches that are taking too long to execute, which will cause problems.

Topic Marking and Topic Views
Topic marking is what IP.Board uses to know when a topic has been read. Even if a user switches computers or to their mobile phone, the community will still know what topics they have read and what is unread. If you disable the feature, the markers will still be available, but will not work correctly across multiple computers, as topic marking will shift to a cookie on the local user's computer.
Topic View Counting has the option of being updated instantly, or every 3 hours. On a community with lots of users quickly accessing different topics, updating view counters frequently may create excessive load on your board. We suggest disabling immediate topic view updating, and instead use the topic update tool that automatically runs every 3 hours.



1 Comments

It should be noted that if you have minify enabled, you also need to copy your public/min directory to use the CDN settings.


Developer Docs · Error Codes