? pathauto-834198.patch
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.45.2.29
diff -u -p -r1.45.2.29 pathauto.inc
--- pathauto.inc	27 Sep 2010 15:52:58 -0000	1.45.2.29
+++ pathauto.inc	10 Feb 2011 02:17:40 -0000
@@ -79,8 +79,14 @@ function _pathauto_existing_alias_data($
  *   The cleaned string.
  */
 function pathauto_cleanstring($string) {
+  static $aliases = array();
   $output = $string;
 
+  // Check cache.
+  if (isset($aliases[$string])) {
+    return $aliases[$string];
+  }
+
   // Optionally remove accents and transliterate
   if (variable_get('pathauto_transliterate', FALSE)) {
     static $translations;
@@ -158,6 +164,9 @@ function pathauto_cleanstring($string) {
   $maxlength = min(variable_get('pathauto_max_component_length', 100), _pathauto_get_schema_alias_maxlength());
   $output = drupal_substr($output, 0, $maxlength);
 
+  // Place in cache.
+  $aliases[$string] = $output;
+
   return $output;
 }
 
