Performance and Health

These FAQs briefly summarise key points regarding performance considerations for Composr sites. It also touches on the Health Check system.

For more information, check out these tutorials:
Question What are Composr caches and how do they improve website performance?
Answer Composr utilizes various types of caches to enhance performance by storing pre-calculated results and reducing repetitive tasks. These caches include:
  • Language cache: Eliminates the need to parse language files on each page load.
  • Template cache: Avoids reparsing template files repeatedly.
  • Comcode page cache & Comcode cache: Reduces the need to parse Comcode pages and general Comcode usage.
  • Block cache: Caches blocks based on their parameters, minimizing execution.
  • Theme image cache: Prevents redundant searches for theme images.
  • Values caches: Stores calculated values like member post counts.
  • Persistent cache: Keeps frequently used data in memory for faster access.
  • Advanced admin cache: Allows admins to view cached pages while the server generates updates.
  • Static cache: Serves static pages to bots and guests, bypassing much of the framework.
  • Self learning cache: Optimizes resource loading by learning which resources each page requires.
Question What is static caching and how do I enable it?
Answer Static caching drastically improves performance by serving pre-generated pages to bots and guests. This works because these users typically don't require dynamic content. To enable it:
  • Go to the Installation Options editor (yourbaseurl/config_editor.php). You will need your maintenance password.
  • Activate the static cache option.

Composr intelligently determines what to cache, and you can further control this via options within the Installation Options. Be aware that enabling static caching may disable eCommerce features for guests unless specifically configured.
Question How can I reduce disk activity to improve performance?
Answer If your hard disk is slow, you can implement the following settings in your _config.php file to minimize disk access:
  • $SITE_INFO['disable_smart_decaching'] = '1';
  • $SITE_INFO['no_disk_sanity_checks'] = '1';
  • $SITE_INFO['hardcode_common_module_zones'] = '1';
  • $SITE_INFO['prefer_direct_code_call'] = '1';
  • $SITE_INFO['charset'] = 'utf-8';
  • $SITE_INFO['known_suexec'] = '1';
  • $SITE_INFO['dev_mode'] = '0';
  • $SITE_INFO['no_extra_logs'] = '1';
  • $SITE_INFO['no_extra_bots'] = '1';
  • $SITE_INFO['no_extra_closed_file'] = '1';
  • $SITE_INFO['no_installer_checks'] = '1';
  • $SITE_INFO['assume_full_mobile_support'] = '1';
  • $SITE_INFO['no_extra_mobiles'] = '1';

Note: These settings override default behaviors and may have unintended consequences. Use with caution.
Question What is rate limiting and how can I enable it in Composr?
Answer Rate limiting prevents server overload by restricting the number of requests allowed from a single IP address within a specific timeframe. To enable Composr's built-in rate limiting, add the following to your _config.php file:

Code (PHP)

$SITE_INFO['rate_limiting'] = '1';
$SITE_INFO['rate_limit_time_window'] = '10';
$SITE_INFO['rate_limit_hits_per_window'] = '5';
 

This configuration limits each IP to 5 requests every 10 seconds. This feature generates soft errors early in the process before Composr fully loads.
Question How can I use Content Delivery Networks (CDNs) to enhance my website?
Answer CDNs improve website performance by serving content from geographically distributed servers, reducing latency and server load. You can leverage CDNs for your Composr website by:
  • Configuring the CDN option in Composr with a comma-separated list of CDN domain names.
  • Ensuring your files are mirrored on the CDN servers.
  • Utilizing the CDN_FILTER directive and symbol to control what content is served via CDN.
Question What is the purpose of the Health Check feature in Composr?
Answer The Health Check feature in Composr proactively identifies potential issues that may affect your website's performance, security, and overall health. It performs various checks and alerts you to problems like:
  • Broken links and forms
  • Security vulnerabilities
  • Outdated software versions
  • Server performance issues
  • Email configuration problems

The Health Check can be run manually or scheduled to run automatically and send e-mail notifications of results.
Question How can I access PHP-Info in Composr?
Answer PHP-Info provides a comprehensive overview of your PHP configuration. You can access it within Composr by navigating to Admin Zone > Tools > PHP-Info / Server Checks.

This page also provides additional useful server information.
Question What are cleanup tools in Composr and how do I use them?
Answer Cleanup tools assist with website maintenance by deleting unnecessary data and optimizing database tables. They are divided into "De-cachers" and "Optimizers". You can access them through:

Admin Zone > Tools > Cleanup tools.