Description:
This patch is recommended if you are using the external pagecache with memcache. It could be adapted to other external caching mechanisms, too, but this version includes a patch for memcache.inc.
patch
Page-cache Lock
Drupal Performance and Scalability Patches
The following collection of patches are useful performance and scalability tweaks that can be applied to Drupal websites. This collection will continue to grow, and is being maintained as a reference page for our online performance and scalability book. As new versions of Drupal are released, updated version of these patches will be added to this page.
To learn more about how these patches work, where they came from, and if they've been merged upstream, you can click the readme link following each patch's brief description. We welcome all feedback, and suggestions for other patches that should be included in this collection.
Drupal to js
Description:
If using PHP 5.2 or later (as required by Drupal 7+), drupal_to_js() can be simplified by using PHP's built-in json_encode() function.
Status:
Committed to Drupal 7 on March 17, 2008.
http://drupal.org/node/222578#comment-772769
Patch:
http://tag1consulting.com/patches#drupal_to_js
Original patch source:
http://drupal.org/node/222578
http://drupal.org/files/issues/improve-drupal_to_js-222578-2.patch
Drupal lookup path
Description:
The drupal_lookup_path function unnecessarily counts all rows of the url_alias table to determine if any aliases are defined. This can be expensive on a transactional database such as MySQL with the InnoDB Storage Engine or PostgreSQL when a website has a lot of aliases. This patch modifies the query to always only return one row, possible because any existing pid will be greater than 0. If no aliases are defined, it will return 0.
Status:
This patch has not been merged into any release of Drupal.
Patch
External page-cache
Description:
Re-order Drupal core's bootstrap process so anonymous pages can be served from an external cache (such as memcache) without hitting the database.
Drupal's default bootstrap order is as follows:
DRUPAL_BOOTSTRAP_CONFIGURATION
DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE
DRUPAL_BOOTSTRAP_DATABASE
DRUPAL_BOOTSTRAP_ACCESS
DRUPAL_BOOTSTRAP_SESSION
DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE
This patch changes it as follows:
DRUPAL_BOOTSTRAP_CONFIGURATION
DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE
DRUPAL_BOOTSTRAP_SESSION
CDN patch
Description:
Patch Drupal core to serve static content from a CDN. This patch will serve user-uploaded files (if using public downloads), CSS files, JavaScripts, and theme images from a CDN.
To serve all of the above content from a single CDN path, set the 'cdn_base_url' variable. To serve one or more of the above from a different path, set one or more of the following variables: 'file_base_url', 'css_base_url', 'js_base_url', and 'theme_base_url'.
