Improve the real or perceived speed of the site, or monitor performance metrics.

Ubercart CloudFront

Do you want super fast file downloads from your Ubercart store?

Multicron

This module is designed to help manage large multisite installations by allowing a master installation to run multiple slave crons when the master runs cron.

Roadmap

CLI Daemon

This module provides a really fast, secure and stable, lightweight CLI Daemon. This daemon exposes a simple hook in order for module to run actions using it.

Features

  • Clean usage of pcntl_* extension, with SIG handling.
  • Lightweight, it does bootstrap a Drupal in child processes in order to let modules benefits from hook_init(), hook_exit(), and a clean environment.
  • Is able to run job_queue jobs, and Drupal cron if no other module has been run.
  • Provide a Drush integration.
  • The CLI Daemon can be run and killed by site administrator from the Drupal administration.
  • Proceed implementing module list pragmatically, run the first found and dies after remembering where is its module pointer within the module list.

CSSTidy

This modules is no longer being maintained.

Consider migrating to Advanced CSS/JS Aggregation

This module automatically runs CSSTidy using the highest compression template when CSS optimization is enabled in the Performance settings. It can also be configured to make the stylesheet readable using minimal linebreaks while still significantly compressing it. The default Drupal optimization removes whitespace around separators and comments that are not CSS hacks. This leaves much to be desired, especially considering it doesn't effectively remove all unnecessary whitespace is some instances. CSSTidy improves upon this by optimizing the stylesheet in the following ways:

  • Colors like black or rgb(0,0,0) are converted short-hand hex-codes like #000 when possible. Some hex-codes are replaced by their color names if they are shorter (#f00 becomes red)
  • a{property:x;property:y;} becomes a{property:y;} (all duplicate properties are merged)
  • margin:1px 1px 1px 1px; becomes margin:1px;
  • margin:0px; becomes margin:0;

CSS Embedded Images

How does it work?

According to Wikipedia, "the data URI scheme is a URI scheme that provides a way to include data in line in web pages as if they were external resources." That means that rather than having a URL telling the browser where to find the image you actually have the image data right there on the page so the browser does not have to make an extra request to get it. This particular module is only concerned with images referenced in CSS, so for an example let's look at a declaration in Garland's CSS:

ul li.expanded {
  background: transparent url(images/menu-expanded.gif) no-repeat 1px .35em;
}

When we embed the image into the CSS, it becomes:

ul li.expanded {
  background: transparent url(data:image/gif;base64,
  R0lGODlhCgAKAMQUAM/Q0vT09Ojr7s7Q0dLU1f7+/u/z9+Dj5tfX1+Dg4MrKyu
  fq7tfZ27m5uba2tsLCwvv7+7W1tbS0tP////P3+wAAAAAAAAAAAAAAAAAAAAAA
  AAAAAAAAAAAAAAAAAAAAACH5BAEAABQALAAAAAAKAAoAAAU0ICWOZGkCkaRKEU
  AtTzHNU/Es1JDQUzKIggZkBmkIRgTEDEEgGRyBgMNQYigUDBPlcCCFAAA7) no-repeat 1px .35em;
}

The actual process is a bit more involved than that, but this is the general concept. By default, embedded images are placed in a separate CSS file to allow for parallel rendering of other site styles while the relatively large image data is being downloaded.

AJAX Cache

AJAX Cache acts much like imagecache by generating the result of a request on demand and storing it on the filesystem for later reuse. This is useful if you are trying to scale a site that makes many dynamic ajax calls. AJAX cache saves results directly to the files so the web server can serve them directly, rather then bootstrapping Drupal.

AJAX Cache will do nothing by itself. Supporting code must call it.

How to use

First you define the presets you are going to use like this:

/**
 * Test implementation of hook_ajaxcache_presets().
 */
function ajaxcache_ajaxcache_presets() {
  return array(
    'test' => array(
      // Name of your function that outputs the data to be cached
      'callback' => 'ajaxcache_test_callback',

      // Optional: include file where the callback is located.
      // 'file' => 'include.inc',

      // Optional: file extension to be used when serving the file. Defaults to html.
      // 'extension' => 'json',

      // Optional: file name (without extension) to be used when serving the file. Defaults to ajax.
      // 'filename' => 'test',
    ),
  );

Then, instead of passing javascript the URL that would point to your output function through the menu system, you pass the URL returned by:

ajaxcache_get_url($preset_name, $args);

Pages

Subscribe with RSS Subscribe to RSS - Performance