Faster, lower memory pathauto module

This module is based on and should be functionally identical to pathauto 5.x-1.2. The difference is the size.

The stock pathauto.module is 25220 bytes long and includes another 31787 bytes of files on every page view for a total of 57000 bytes of PHP code.

This module is 3020 bytes long and does not load any other code if the current page does not use any pathauto functionality.

The advantages of using this module are:

  • decreased drupal memory footprint (potentially allowing the server to handle more simultaneous requests)
  • smaller included php code size (which makes page views faster in stock PHP)

The disadvantages:

  • possibly slower with op code cache/php accelerator/optimizer enabled
  • pathauto operations themselves (like creating aliases and viewing the pathauto administration page) may be slower.

On php 5.2.2 with a copy of a live site (with many other modules), for example, I see a speed improvement from 684ms to 663ms per page load of the user login form 'user', and that's with all of the files totally loaded into the Linux file buffers. Your results will likely differ.

The module is distributed as a patch against pathauto 5.x-1.2. You can download it below.


cd sites/all/modules/pathauto
wget -O - | bzcat | patch -p0
Binary Data fast_pathauto-5.x-1.2.patch.bz29.45 KB


Could you provide a drop-in version instead or is there a new version for the pathauto code?

anytime soon a 6.x version ?

Subscribe to All Posts - Wesley Tanaka